
/* Python wrapper functions auto-generated by pidl */
#define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
#include "lib/replace/system/python.h"
#include "python/py3compat.h"
#include "includes.h"
#include "python/modules.h"
#include <pytalloc.h>
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/pyrpc_util.h"
#include "bin/default/librpc/gen_ndr/ndr_netlogon.h"
#include "bin/default/librpc/gen_ndr/ndr_netlogon_c.h"

/*
 * Suppress compiler warnings if the generated code does not call these
 * functions
 */
#ifndef _MAYBE_UNUSED_
#ifdef __has_attribute
#if __has_attribute(unused)
#define _MAYBE_UNUSED_ __attribute__ ((unused))
#else
#define _MAYBE_UNUSED_
#endif
#endif
#endif
/*
 * These functions are here to ensure they can be optimized out by
 * the compiler based on the constant input values
 */

static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
{
	switch (var_size) {
	case 8:
		return UINT64_MAX;
	case 4:
		return UINT32_MAX;
	case 2:
		return UINT16_MAX;
	case 1:
		return UINT8_MAX;
	}

	return 0;
}

static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
{
	switch (var_size) {
	case 8:
		return INT64_MAX;
	case 4:
		return INT32_MAX;
	case 2:
		return INT16_MAX;
	case 1:
		return INT8_MAX;
	}

	return 0;
}

#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/samr.h"
#include "librpc/gen_ndr/security.h"
#include "librpc/gen_ndr/nbt.h"
static PyTypeObject netr_UasInfo_Type;
static PyTypeObject netr_UasLogoffInfo_Type;
static PyTypeObject netr_AcctLockStr_Type;
static PyTypeObject netr_IdentityInfo_Type;
static PyTypeObject netr_PasswordInfo_Type;
static PyTypeObject netr_ChallengeResponse_Type;
static PyTypeObject netr_NetworkInfo_Type;
static PyTypeObject netr_GenericInfo_Type;
static PyTypeObject netr_TicketLogonInfo_Type;
static PyTypeObject netr_LogonLevel_Type;
static PyTypeObject netr_UserSessionKey_Type;
static PyTypeObject netr_LMSessionKey_Type;
static PyTypeObject netr_SamBaseInfo_Type;
static PyTypeObject netr_SamInfo2_Type;
static PyTypeObject netr_SidAttr_Type;
static PyTypeObject netr_SamInfo3_Type;
static PyTypeObject netr_SamInfo6_Type;
static PyTypeObject netr_PacInfo_Type;
static PyTypeObject netr_GenericInfo2_Type;
static PyTypeObject netr_ValidationTicketLogon_Type;
static PyTypeObject netr_Validation_Type;
static PyTypeObject netr_Credential_Type;
static PyTypeObject netlogon_server_pipe_state_Type;
static PyTypeObject netr_Authenticator_Type;
static PyTypeObject netr_DELTA_DELETE_USER_Type;
static PyTypeObject netr_USER_KEY16_Type;
static PyTypeObject netr_PasswordHistory_Type;
static PyTypeObject netr_USER_KEYS2_Type;
static PyTypeObject netr_USER_KEY_UNION_Type;
static PyTypeObject netr_USER_KEYS_Type;
static PyTypeObject netr_USER_PRIVATE_INFO_Type;
static PyTypeObject netr_DELTA_USER_Type;
static PyTypeObject netr_DELTA_DOMAIN_Type;
static PyTypeObject netr_DELTA_GROUP_Type;
static PyTypeObject netr_DELTA_RENAME_Type;
static PyTypeObject netr_DELTA_GROUP_MEMBER_Type;
static PyTypeObject netr_DELTA_ALIAS_Type;
static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type;
static PyTypeObject netr_QUOTA_LIMITS_Type;
static PyTypeObject netr_DELTA_POLICY_Type;
static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type;
static PyTypeObject netr_DELTA_ACCOUNT_Type;
static PyTypeObject netr_CIPHER_VALUE_Type;
static PyTypeObject netr_DELTA_SECRET_Type;
static PyTypeObject netr_DELTA_UNION_Type;
static PyTypeObject netr_DELTA_ID_UNION_Type;
static PyTypeObject netr_DELTA_ENUM_Type;
static PyTypeObject netr_DELTA_ENUM_ARRAY_Type;
static PyTypeObject netr_UAS_INFO_0_Type;
static PyTypeObject netr_AccountBuffer_Type;
static PyTypeObject netr_NETLOGON_INFO_1_Type;
static PyTypeObject netr_NETLOGON_INFO_2_Type;
static PyTypeObject netr_NETLOGON_INFO_3_Type;
static PyTypeObject netr_NETLOGON_INFO_4_Type;
static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type;
static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type;
static PyTypeObject netr_ChangeLogObject_Type;
static PyTypeObject netr_ChangeLogEntry_Type;
static PyTypeObject netr_Blob_Type;
static PyTypeObject netr_DsRGetDCNameInfo_Type;
static PyTypeObject netr_Capabilities_Type;
static PyTypeObject netr_LsaPolicyInformation_Type;
static PyTypeObject netr_OsVersionInfoEx_Type;
static PyTypeObject netr_OsVersion_Type;
static PyTypeObject netr_OsVersionContainer_Type;
static PyTypeObject netr_WorkstationInformation_Type;
static PyTypeObject netr_WorkstationInfo_Type;
static PyTypeObject netr_trust_extension_info_Type;
static PyTypeObject netr_trust_extension_Type;
static PyTypeObject netr_trust_extension_container_Type;
static PyTypeObject netr_OneDomainInfo_Type;
static PyTypeObject netr_DomainInformation_Type;
static PyTypeObject netr_DomainInfo_Type;
static PyTypeObject NL_PASSWORD_VERSION_Type;
static PyTypeObject netr_CryptPassword_Type;
static PyTypeObject netr_SendToSamResetBadPasswordCount_Type;
static PyTypeObject netr_SendToSamMessage_Type;
static PyTypeObject netr_SendToSamBase_Type;
static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type;
static PyTypeObject netr_DsRAddress_Type;
static PyTypeObject netr_DomainTrust_Type;
static PyTypeObject netr_DomainTrustList_Type;
static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type;
static PyTypeObject DcSitesCtr_Type;
static PyTypeObject netr_TrustInfo_Type;
static PyTypeObject NL_DNS_NAME_INFO_Type;
static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type;
static PyTypeObject netlogon_InterfaceType;
static PyTypeObject netr_LogonUasLogon_Type;
static PyTypeObject netr_LogonUasLogoff_Type;
static PyTypeObject netr_LogonSamLogon_Type;
static PyTypeObject netr_LogonSamLogoff_Type;
static PyTypeObject netr_ServerReqChallenge_Type;
static PyTypeObject netr_ServerAuthenticate_Type;
static PyTypeObject netr_ServerPasswordSet_Type;
static PyTypeObject netr_DatabaseDeltas_Type;
static PyTypeObject netr_DatabaseSync_Type;
static PyTypeObject netr_AccountDeltas_Type;
static PyTypeObject netr_AccountSync_Type;
static PyTypeObject netr_GetDcName_Type;
static PyTypeObject netr_LogonControl_Type;
static PyTypeObject netr_GetAnyDCName_Type;
static PyTypeObject netr_LogonControl2_Type;
static PyTypeObject netr_ServerAuthenticate2_Type;
static PyTypeObject netr_DatabaseSync2_Type;
static PyTypeObject netr_DatabaseRedo_Type;
static PyTypeObject netr_LogonControl2Ex_Type;
static PyTypeObject netr_NetrEnumerateTrustedDomains_Type;
static PyTypeObject netr_DsRGetDCName_Type;
static PyTypeObject netr_LogonGetCapabilities_Type;
static PyTypeObject netr_LogonGetTrustRid_Type;
static PyTypeObject netr_ServerAuthenticate3_Type;
static PyTypeObject netr_DsRGetDCNameEx_Type;
static PyTypeObject netr_DsRGetSiteName_Type;
static PyTypeObject netr_LogonGetDomainInfo_Type;
static PyTypeObject netr_ServerPasswordSet2_Type;
static PyTypeObject netr_ServerPasswordGet_Type;
static PyTypeObject netr_NetrLogonSendToSam_Type;
static PyTypeObject netr_DsRAddressToSitenamesW_Type;
static PyTypeObject netr_DsRGetDCNameEx2_Type;
static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type;
static PyTypeObject netr_DsRAddressToSitenamesExW_Type;
static PyTypeObject netr_DsrGetDcSiteCoverageW_Type;
static PyTypeObject netr_LogonSamLogonEx_Type;
static PyTypeObject netr_DsrEnumerateDomainTrusts_Type;
static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type;
static PyTypeObject netr_ServerTrustPasswordsGet_Type;
static PyTypeObject netr_DsRGetForestTrustInformation_Type;
static PyTypeObject netr_GetForestTrustInformation_Type;
static PyTypeObject netr_LogonSamLogonWithFlags_Type;
static PyTypeObject netr_ServerGetTrustInfo_Type;
static PyTypeObject netr_Unused47_Type;
static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type;
static PyTypeObject netr_ServerAuthenticateKerberos_Type;

static PyTypeObject *BaseObject_Type;
static PyTypeObject *lsa_String_Type;
static PyTypeObject *samr_Password_Type;
static PyTypeObject *samr_RidWithAttributeArray_Type;
static PyTypeObject *lsa_StringLarge_Type;
static PyTypeObject *dom_sid_Type;
static PyTypeObject *samr_LogonHours_Type;
static PyTypeObject *lsa_BinaryString_Type;
static PyTypeObject *sec_desc_buf_Type;
static PyTypeObject *lsa_SidArray_Type;
static PyTypeObject *GUID_Type;
static PyTypeObject *lsa_ForestTrustInformation_Type;
static PyTypeObject *ClientConnection_Type;
static PyTypeObject *ndr_syntax_id_Type;

static PyObject *py_netr_UasInfo_get_account_name(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		if (object->account_name == NULL) {
			py_account_name = Py_None;
			Py_INCREF(py_account_name);
		} else {
			py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
		}
	}
	return py_account_name;
}

static int py_netr_UasInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
		return -1;
	}
	if (value == Py_None) {
		object->account_name = NULL;
	} else {
		object->account_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->account_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_priv(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_priv;
	py_priv = PyLong_FromUnsignedLongLong((uint32_t)(object->priv));
	return py_priv;
}

static int py_netr_UasInfo_set_priv(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->priv");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priv));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->priv = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_auth_flags(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_auth_flags;
	py_auth_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->auth_flags));
	return py_auth_flags;
}

static int py_netr_UasInfo_set_auth_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auth_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->auth_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_logon_count(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_count;
	py_logon_count = PyLong_FromUnsignedLongLong((uint32_t)(object->logon_count));
	return py_logon_count;
}

static int py_netr_UasInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_bad_pw_count(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_bad_pw_count;
	py_bad_pw_count = PyLong_FromUnsignedLongLong((uint32_t)(object->bad_pw_count));
	return py_bad_pw_count;
}

static int py_netr_UasInfo_set_bad_pw_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_pw_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_pw_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->bad_pw_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_last_logon(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_last_logon;
	py_last_logon = PyLong_FromLong(object->last_logon);
	return py_last_logon;
}

static int py_netr_UasInfo_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logon");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logon));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->last_logon = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_last_logoff(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_last_logoff;
	py_last_logoff = PyLong_FromLong(object->last_logoff);
	return py_last_logoff;
}

static int py_netr_UasInfo_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logoff");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logoff));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->last_logoff = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_logoff_time(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logoff_time;
	py_logoff_time = PyLong_FromLong(object->logoff_time);
	return py_logoff_time;
}

static int py_netr_UasInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logoff_time");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->logoff_time));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->logoff_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_kickoff_time(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_kickoff_time;
	py_kickoff_time = PyLong_FromLong(object->kickoff_time);
	return py_kickoff_time;
}

static int py_netr_UasInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->kickoff_time");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->kickoff_time));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->kickoff_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_password_age(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_password_age;
	py_password_age = PyLong_FromUnsignedLongLong((uint32_t)(object->password_age));
	return py_password_age;
}

static int py_netr_UasInfo_set_password_age(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password_age");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_age));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->password_age = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_pw_can_change(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_pw_can_change;
	py_pw_can_change = PyLong_FromLong(object->pw_can_change);
	return py_pw_can_change;
}

static int py_netr_UasInfo_set_pw_can_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pw_can_change");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_can_change));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->pw_can_change = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_pw_must_change(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_pw_must_change;
	py_pw_must_change = PyLong_FromLong(object->pw_must_change);
	return py_pw_must_change;
}

static int py_netr_UasInfo_set_pw_must_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pw_must_change");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_must_change));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->pw_must_change = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_computer(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_computer;
	if (object->computer == NULL) {
		Py_RETURN_NONE;
	}
	if (object->computer == NULL) {
		py_computer = Py_None;
		Py_INCREF(py_computer);
	} else {
		if (object->computer == NULL) {
			py_computer = Py_None;
			Py_INCREF(py_computer);
		} else {
			py_computer = PyUnicode_Decode(object->computer, strlen(object->computer), "utf-8", "ignore");
		}
	}
	return py_computer;
}

static int py_netr_UasInfo_set_computer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->computer");
		return -1;
	}
	if (value == Py_None) {
		object->computer = NULL;
	} else {
		object->computer = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->computer = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_domain(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domain;
	if (object->domain == NULL) {
		Py_RETURN_NONE;
	}
	if (object->domain == NULL) {
		py_domain = Py_None;
		Py_INCREF(py_domain);
	} else {
		if (object->domain == NULL) {
			py_domain = Py_None;
			Py_INCREF(py_domain);
		} else {
			py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
		}
	}
	return py_domain;
}

static int py_netr_UasInfo_set_domain(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain");
		return -1;
	}
	if (value == Py_None) {
		object->domain = NULL;
	} else {
		object->domain = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->domain = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_script_path(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_script_path;
	if (object->script_path == NULL) {
		Py_RETURN_NONE;
	}
	if (object->script_path == NULL) {
		py_script_path = Py_None;
		Py_INCREF(py_script_path);
	} else {
		if (object->script_path == NULL) {
			py_script_path = Py_None;
			Py_INCREF(py_script_path);
		} else {
			py_script_path = PyUnicode_Decode(object->script_path, strlen(object->script_path), "utf-8", "ignore");
		}
	}
	return py_script_path;
}

static int py_netr_UasInfo_set_script_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->script_path");
		return -1;
	}
	if (value == Py_None) {
		object->script_path = NULL;
	} else {
		object->script_path = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->script_path = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_UasInfo_get_unknown(PyObject *obj, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown;
	py_unknown = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown));
	return py_unknown;
}

static int py_netr_UasInfo_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_UasInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "account_name"),
		.get = py_netr_UasInfo_get_account_name,
		.set = py_netr_UasInfo_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "priv"),
		.get = py_netr_UasInfo_get_priv,
		.set = py_netr_UasInfo_set_priv,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "auth_flags"),
		.get = py_netr_UasInfo_get_auth_flags,
		.set = py_netr_UasInfo_set_auth_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "logon_count"),
		.get = py_netr_UasInfo_get_logon_count,
		.set = py_netr_UasInfo_set_logon_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "bad_pw_count"),
		.get = py_netr_UasInfo_get_bad_pw_count,
		.set = py_netr_UasInfo_set_bad_pw_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "last_logon"),
		.get = py_netr_UasInfo_get_last_logon,
		.set = py_netr_UasInfo_set_last_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type time_t")
	},
	{
		.name = discard_const_p(char, "last_logoff"),
		.get = py_netr_UasInfo_get_last_logoff,
		.set = py_netr_UasInfo_set_last_logoff,
		.doc = discard_const_p(char, "PIDL-generated element of base type time_t")
	},
	{
		.name = discard_const_p(char, "logoff_time"),
		.get = py_netr_UasInfo_get_logoff_time,
		.set = py_netr_UasInfo_set_logoff_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type time_t")
	},
	{
		.name = discard_const_p(char, "kickoff_time"),
		.get = py_netr_UasInfo_get_kickoff_time,
		.set = py_netr_UasInfo_set_kickoff_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type time_t")
	},
	{
		.name = discard_const_p(char, "password_age"),
		.get = py_netr_UasInfo_get_password_age,
		.set = py_netr_UasInfo_set_password_age,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "pw_can_change"),
		.get = py_netr_UasInfo_get_pw_can_change,
		.set = py_netr_UasInfo_set_pw_can_change,
		.doc = discard_const_p(char, "PIDL-generated element of base type time_t")
	},
	{
		.name = discard_const_p(char, "pw_must_change"),
		.get = py_netr_UasInfo_get_pw_must_change,
		.set = py_netr_UasInfo_set_pw_must_change,
		.doc = discard_const_p(char, "PIDL-generated element of base type time_t")
	},
	{
		.name = discard_const_p(char, "computer"),
		.get = py_netr_UasInfo_get_computer,
		.set = py_netr_UasInfo_set_computer,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "domain"),
		.get = py_netr_UasInfo_get_domain,
		.set = py_netr_UasInfo_set_domain,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "script_path"),
		.get = py_netr_UasInfo_get_script_path,
		.set = py_netr_UasInfo_set_script_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "unknown"),
		.get = py_netr_UasInfo_get_unknown,
		.set = py_netr_UasInfo_set_unknown,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_UasInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_UasInfo",
	.tp_getset = py_netr_UasInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_UasInfo_new,
};


static PyObject *py_netr_UasLogoffInfo_get_duration(PyObject *obj, void *closure)
{
	struct netr_UasLogoffInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_duration;
	py_duration = PyLong_FromUnsignedLongLong((uint32_t)(object->duration));
	return py_duration;
}

static int py_netr_UasLogoffInfo_set_duration(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasLogoffInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->duration");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->duration));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->duration = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UasLogoffInfo_get_logon_count(PyObject *obj, void *closure)
{
	struct netr_UasLogoffInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_count;
	py_logon_count = PyLong_FromLong((uint16_t)(object->logon_count));
	return py_logon_count;
}

static int py_netr_UasLogoffInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UasLogoffInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_UasLogoffInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "duration"),
		.get = py_netr_UasLogoffInfo_get_duration,
		.set = py_netr_UasLogoffInfo_set_duration,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "logon_count"),
		.get = py_netr_UasLogoffInfo_get_logon_count,
		.set = py_netr_UasLogoffInfo_set_logon_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_UasLogoffInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_UasLogoffInfo",
	.tp_getset = py_netr_UasLogoffInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_UasLogoffInfo_new,
};


static PyObject *py_netr_AcctLockStr_get_lockout_duration(PyObject *obj, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
	PyObject *py_lockout_duration;
	py_lockout_duration = PyLong_FromLongLong(object->lockout_duration);
	return py_lockout_duration;
}

static int py_netr_AcctLockStr_set_lockout_duration(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lockout_duration");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->lockout_duration));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->lockout_duration = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AcctLockStr_get_reset_count(PyObject *obj, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
	PyObject *py_reset_count;
	py_reset_count = PyLong_FromUnsignedLongLong(object->reset_count);
	return py_reset_count;
}

static int py_netr_AcctLockStr_set_reset_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reset_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reset_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->reset_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AcctLockStr_get_bad_attempt_lockout(PyObject *obj, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
	PyObject *py_bad_attempt_lockout;
	py_bad_attempt_lockout = PyLong_FromUnsignedLongLong((uint32_t)(object->bad_attempt_lockout));
	return py_bad_attempt_lockout;
}

static int py_netr_AcctLockStr_set_bad_attempt_lockout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_attempt_lockout");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_attempt_lockout));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->bad_attempt_lockout = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AcctLockStr_get_dummy(PyObject *obj, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy;
	py_dummy = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy));
	return py_dummy;
}

static int py_netr_AcctLockStr_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_AcctLockStr_getsetters[] = {
	{
		.name = discard_const_p(char, "lockout_duration"),
		.get = py_netr_AcctLockStr_get_lockout_duration,
		.set = py_netr_AcctLockStr_set_lockout_duration,
		.doc = discard_const_p(char, "PIDL-generated element of base type dlong")
	},
	{
		.name = discard_const_p(char, "reset_count"),
		.get = py_netr_AcctLockStr_get_reset_count,
		.set = py_netr_AcctLockStr_set_reset_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type udlong")
	},
	{
		.name = discard_const_p(char, "bad_attempt_lockout"),
		.get = py_netr_AcctLockStr_get_bad_attempt_lockout,
		.set = py_netr_AcctLockStr_set_bad_attempt_lockout,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "dummy"),
		.get = py_netr_AcctLockStr_get_dummy,
		.set = py_netr_AcctLockStr_set_dummy,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_AcctLockStr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_AcctLockStr);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_AcctLockStr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_AcctLockStr);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_AcctLockStr_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_AcctLockStr *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_AcctLockStr, "netr_AcctLockStr", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_AcctLockStr, "netr_AcctLockStr", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_AcctLockStr_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_AcctLockStr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AcctLockStr_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AcctLockStr_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_AcctLockStr_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_AcctLockStr",
	.tp_getset = py_netr_AcctLockStr_getsetters,
	.tp_methods = py_netr_AcctLockStr_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_AcctLockStr_new,
};


static PyObject *py_netr_IdentityInfo_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
	return py_domain_name;
}

static int py_netr_IdentityInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_IdentityInfo_get_parameter_control(PyObject *obj, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_parameter_control;
	py_parameter_control = PyLong_FromUnsignedLongLong((uint32_t)(object->parameter_control));
	return py_parameter_control;
}

static int py_netr_IdentityInfo_set_parameter_control(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parameter_control");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parameter_control));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->parameter_control = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_IdentityInfo_get_logon_id(PyObject *obj, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_id;
	py_logon_id = PyLong_FromUnsignedLongLong(object->logon_id);
	return py_logon_id;
}

static int py_netr_IdentityInfo_set_logon_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_id");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_id));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_id = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_IdentityInfo_get_account_name(PyObject *obj, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_netr_IdentityInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_IdentityInfo_get_workstation(PyObject *obj, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_workstation;
	py_workstation = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstation);
	return py_workstation;
}

static int py_netr_IdentityInfo_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_IdentityInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstation");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->workstation = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_IdentityInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "domain_name"),
		.get = py_netr_IdentityInfo_get_domain_name,
		.set = py_netr_IdentityInfo_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "parameter_control"),
		.get = py_netr_IdentityInfo_get_parameter_control,
		.set = py_netr_IdentityInfo_set_parameter_control,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonParameterControl")
	},
	{
		.name = discard_const_p(char, "logon_id"),
		.get = py_netr_IdentityInfo_get_logon_id,
		.set = py_netr_IdentityInfo_set_logon_id,
		.doc = discard_const_p(char, "PIDL-generated element of base type udlong")
	},
	{
		.name = discard_const_p(char, "account_name"),
		.get = py_netr_IdentityInfo_get_account_name,
		.set = py_netr_IdentityInfo_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "workstation"),
		.get = py_netr_IdentityInfo_get_workstation,
		.set = py_netr_IdentityInfo_set_workstation,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_IdentityInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_IdentityInfo",
	.tp_getset = py_netr_IdentityInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_IdentityInfo_new,
};


static PyObject *py_netr_PasswordInfo_get_identity_info(PyObject *obj, void *closure)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_identity_info;
	py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
	return py_identity_info;
}

static int py_netr_PasswordInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->identity_info");
		return -1;
	}
	PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PasswordInfo_get_lmpassword(PyObject *obj, void *closure)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_lmpassword;
	py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
	return py_lmpassword;
}

static int py_netr_PasswordInfo_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmpassword");
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PasswordInfo_get_ntpassword(PyObject *obj, void *closure)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_ntpassword;
	py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
	return py_ntpassword;
}

static int py_netr_PasswordInfo_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ntpassword");
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_PasswordInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "identity_info"),
		.get = py_netr_PasswordInfo_get_identity_info,
		.set = py_netr_PasswordInfo_set_identity_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
	},
	{
		.name = discard_const_p(char, "lmpassword"),
		.get = py_netr_PasswordInfo_get_lmpassword,
		.set = py_netr_PasswordInfo_set_lmpassword,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "ntpassword"),
		.get = py_netr_PasswordInfo_get_ntpassword,
		.set = py_netr_PasswordInfo_set_ntpassword,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_PasswordInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_PasswordInfo);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_PasswordInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_PasswordInfo);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_PasswordInfo);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_PasswordInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_PasswordInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_PasswordInfo, "netr_PasswordInfo", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_PasswordInfo, "netr_PasswordInfo", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_PasswordInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_PasswordInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_PasswordInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_PasswordInfo_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_PasswordInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_PasswordInfo",
	.tp_getset = py_netr_PasswordInfo_getsetters,
	.tp_methods = py_netr_PasswordInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_PasswordInfo_new,
};


static PyObject *py_netr_ChallengeResponse_get_length(PyObject *obj, void *closure)
{
	struct netr_ChallengeResponse *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromLong((uint16_t)(object->length));
	return py_length;
}

static int py_netr_ChallengeResponse_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChallengeResponse *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChallengeResponse_get_size(PyObject *obj, void *closure)
{
	struct netr_ChallengeResponse *object = pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLong((uint16_t)(object->size));
	return py_size;
}

static int py_netr_ChallengeResponse_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChallengeResponse *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChallengeResponse_get_data(PyObject *obj, void *closure)
{
	struct netr_ChallengeResponse *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		Py_RETURN_NONE;
	}
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyList_New(object->length);
		if (py_data == NULL) {
			return NULL;
		}
		{
			int data_cntr_1;
			for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
				PyObject *py_data_1;
				py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
				PyList_SetItem(py_data, data_cntr_1, py_data_1);
			}
		}
	}
	return py_data;
}

static int py_netr_ChallengeResponse_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChallengeResponse *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
		return -1;
	}
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int data_cntr_1;
			object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
			if (!object->data) { return -1; }
			talloc_set_name_const(object->data, "ARRAY: object->data");
			for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
				if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->data)[data_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_ChallengeResponse_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_ChallengeResponse_get_length,
		.set = py_netr_ChallengeResponse_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "size"),
		.get = py_netr_ChallengeResponse_get_size,
		.set = py_netr_ChallengeResponse_set_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "data"),
		.get = py_netr_ChallengeResponse_get_data,
		.set = py_netr_ChallengeResponse_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_ChallengeResponse_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ChallengeResponse",
	.tp_getset = py_netr_ChallengeResponse_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ChallengeResponse_new,
};


static PyObject *py_netr_NetworkInfo_get_identity_info(PyObject *obj, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_identity_info;
	py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
	return py_identity_info;
}

static int py_netr_NetworkInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->identity_info");
		return -1;
	}
	PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_NetworkInfo_get_challenge(PyObject *obj, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_challenge;
	py_challenge = PyList_New(8);
	if (py_challenge == NULL) {
		return NULL;
	}
	{
		int challenge_cntr_0;
		for (challenge_cntr_0 = 0; challenge_cntr_0 < (8); challenge_cntr_0++) {
			PyObject *py_challenge_0;
			py_challenge_0 = PyLong_FromLong((uint16_t)((object->challenge)[challenge_cntr_0]));
			PyList_SetItem(py_challenge, challenge_cntr_0, py_challenge_0);
		}
	}
	return py_challenge;
}

static int py_netr_NetworkInfo_set_challenge(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->challenge");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int challenge_cntr_0;
		if (ARRAY_SIZE(object->challenge) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->challenge),  PyList_GET_SIZE(value));
			return -1;
		}
		for (challenge_cntr_0 = 0; challenge_cntr_0 < PyList_GET_SIZE(value); challenge_cntr_0++) {
			if (PyList_GET_ITEM(value, challenge_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->challenge)[challenge_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->challenge)[challenge_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, challenge_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, challenge_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->challenge)[challenge_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_NetworkInfo_get_nt(PyObject *obj, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_nt;
	py_nt = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->nt);
	return py_nt;
}

static int py_netr_NetworkInfo_set_nt(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt");
		return -1;
	}
	PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->nt = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_NetworkInfo_get_lm(PyObject *obj, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_lm;
	py_lm = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->lm);
	return py_lm;
}

static int py_netr_NetworkInfo_set_lm(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm");
		return -1;
	}
	PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lm = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_NetworkInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "identity_info"),
		.get = py_netr_NetworkInfo_get_identity_info,
		.set = py_netr_NetworkInfo_set_identity_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
	},
	{
		.name = discard_const_p(char, "challenge"),
		.get = py_netr_NetworkInfo_get_challenge,
		.set = py_netr_NetworkInfo_set_challenge,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "nt"),
		.get = py_netr_NetworkInfo_get_nt,
		.set = py_netr_NetworkInfo_set_nt,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
	},
	{
		.name = discard_const_p(char, "lm"),
		.get = py_netr_NetworkInfo_get_lm,
		.set = py_netr_NetworkInfo_set_lm,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_NetworkInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_NetworkInfo);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_NetworkInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_NetworkInfo);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_NetworkInfo);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_NetworkInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_NetworkInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_NetworkInfo, "netr_NetworkInfo", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_NetworkInfo, "netr_NetworkInfo", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_NetworkInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_NetworkInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetworkInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetworkInfo_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_NetworkInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NetworkInfo",
	.tp_getset = py_netr_NetworkInfo_getsetters,
	.tp_methods = py_netr_NetworkInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NetworkInfo_new,
};


static PyObject *py_netr_GenericInfo_get_identity_info(PyObject *obj, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_identity_info;
	py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
	return py_identity_info;
}

static int py_netr_GenericInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->identity_info");
		return -1;
	}
	PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_GenericInfo_get_package_name(PyObject *obj, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_package_name;
	py_package_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->package_name);
	return py_package_name;
}

static int py_netr_GenericInfo_set_package_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->package_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->package_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_GenericInfo_get_length(PyObject *obj, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
	return py_length;
}

static int py_netr_GenericInfo_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_GenericInfo_get_data(PyObject *obj, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		Py_RETURN_NONE;
	}
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyList_New(object->length);
		if (py_data == NULL) {
			return NULL;
		}
		{
			int data_cntr_1;
			for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
				PyObject *py_data_1;
				py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
				PyList_SetItem(py_data, data_cntr_1, py_data_1);
			}
		}
	}
	return py_data;
}

static int py_netr_GenericInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
		return -1;
	}
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int data_cntr_1;
			object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
			if (!object->data) { return -1; }
			talloc_set_name_const(object->data, "ARRAY: object->data");
			for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
				if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->data)[data_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_GenericInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "identity_info"),
		.get = py_netr_GenericInfo_get_identity_info,
		.set = py_netr_GenericInfo_set_identity_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
	},
	{
		.name = discard_const_p(char, "package_name"),
		.get = py_netr_GenericInfo_get_package_name,
		.set = py_netr_GenericInfo_set_package_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_GenericInfo_get_length,
		.set = py_netr_GenericInfo_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "data"),
		.get = py_netr_GenericInfo_get_data,
		.set = py_netr_GenericInfo_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_GenericInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_GenericInfo);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_GenericInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_GenericInfo);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_GenericInfo);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_GenericInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_GenericInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_GenericInfo, "netr_GenericInfo", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_GenericInfo, "netr_GenericInfo", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_GenericInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_GenericInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GenericInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GenericInfo_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_GenericInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_GenericInfo",
	.tp_getset = py_netr_GenericInfo_getsetters,
	.tp_methods = py_netr_GenericInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_GenericInfo_new,
};


static PyObject *py_netr_TicketLogonInfo_get_identity_info(PyObject *obj, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_identity_info;
	py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
	return py_identity_info;
}

static int py_netr_TicketLogonInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->identity_info");
		return -1;
	}
	PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_TicketLogonInfo_get_request_options(PyObject *obj, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_request_options;
	py_request_options = PyLong_FromUnsignedLongLong(object->request_options);
	return py_request_options;
}

static int py_netr_TicketLogonInfo_set_request_options(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->request_options");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->request_options));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->request_options = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_TicketLogonInfo_get_service_ticket_length(PyObject *obj, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_service_ticket_length;
	py_service_ticket_length = PyLong_FromUnsignedLongLong((uint32_t)(object->service_ticket_length));
	return py_service_ticket_length;
}

static int py_netr_TicketLogonInfo_set_service_ticket_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->service_ticket_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->service_ticket_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->service_ticket_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_TicketLogonInfo_get_service_ticket(PyObject *obj, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_service_ticket;
	if (object->service_ticket == NULL) {
		Py_RETURN_NONE;
	}
	if (object->service_ticket == NULL) {
		py_service_ticket = Py_None;
		Py_INCREF(py_service_ticket);
	} else {
		py_service_ticket = PyList_New(object->service_ticket_length);
		if (py_service_ticket == NULL) {
			return NULL;
		}
		{
			int service_ticket_cntr_1;
			for (service_ticket_cntr_1 = 0; service_ticket_cntr_1 < (object->service_ticket_length); service_ticket_cntr_1++) {
				PyObject *py_service_ticket_1;
				py_service_ticket_1 = PyLong_FromLong((uint16_t)((object->service_ticket)[service_ticket_cntr_1]));
				PyList_SetItem(py_service_ticket, service_ticket_cntr_1, py_service_ticket_1);
			}
		}
	}
	return py_service_ticket;
}

static int py_netr_TicketLogonInfo_set_service_ticket(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->service_ticket));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->service_ticket");
		return -1;
	}
	if (value == Py_None) {
		object->service_ticket = NULL;
	} else {
		object->service_ticket = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int service_ticket_cntr_1;
			object->service_ticket = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->service_ticket, PyList_GET_SIZE(value));
			if (!object->service_ticket) { return -1; }
			talloc_set_name_const(object->service_ticket, "ARRAY: object->service_ticket");
			for (service_ticket_cntr_1 = 0; service_ticket_cntr_1 < PyList_GET_SIZE(value); service_ticket_cntr_1++) {
				if (PyList_GET_ITEM(value, service_ticket_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->service_ticket)[service_ticket_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->service_ticket)[service_ticket_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, service_ticket_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, service_ticket_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->service_ticket)[service_ticket_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_TicketLogonInfo_get_additional_ticket_length(PyObject *obj, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_additional_ticket_length;
	py_additional_ticket_length = PyLong_FromUnsignedLongLong((uint32_t)(object->additional_ticket_length));
	return py_additional_ticket_length;
}

static int py_netr_TicketLogonInfo_set_additional_ticket_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->additional_ticket_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->additional_ticket_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->additional_ticket_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_TicketLogonInfo_get_additional_ticket(PyObject *obj, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_additional_ticket;
	if (object->additional_ticket == NULL) {
		Py_RETURN_NONE;
	}
	if (object->additional_ticket == NULL) {
		py_additional_ticket = Py_None;
		Py_INCREF(py_additional_ticket);
	} else {
		py_additional_ticket = PyList_New(object->additional_ticket_length);
		if (py_additional_ticket == NULL) {
			return NULL;
		}
		{
			int additional_ticket_cntr_1;
			for (additional_ticket_cntr_1 = 0; additional_ticket_cntr_1 < (object->additional_ticket_length); additional_ticket_cntr_1++) {
				PyObject *py_additional_ticket_1;
				py_additional_ticket_1 = PyLong_FromLong((uint16_t)((object->additional_ticket)[additional_ticket_cntr_1]));
				PyList_SetItem(py_additional_ticket, additional_ticket_cntr_1, py_additional_ticket_1);
			}
		}
	}
	return py_additional_ticket;
}

static int py_netr_TicketLogonInfo_set_additional_ticket(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->additional_ticket));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->additional_ticket");
		return -1;
	}
	if (value == Py_None) {
		object->additional_ticket = NULL;
	} else {
		object->additional_ticket = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int additional_ticket_cntr_1;
			object->additional_ticket = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->additional_ticket, PyList_GET_SIZE(value));
			if (!object->additional_ticket) { return -1; }
			talloc_set_name_const(object->additional_ticket, "ARRAY: object->additional_ticket");
			for (additional_ticket_cntr_1 = 0; additional_ticket_cntr_1 < PyList_GET_SIZE(value); additional_ticket_cntr_1++) {
				if (PyList_GET_ITEM(value, additional_ticket_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->additional_ticket)[additional_ticket_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->additional_ticket)[additional_ticket_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, additional_ticket_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, additional_ticket_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->additional_ticket)[additional_ticket_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_TicketLogonInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "identity_info"),
		.get = py_netr_TicketLogonInfo_get_identity_info,
		.set = py_netr_TicketLogonInfo_set_identity_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
	},
	{
		.name = discard_const_p(char, "request_options"),
		.get = py_netr_TicketLogonInfo_get_request_options,
		.set = py_netr_TicketLogonInfo_set_request_options,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_TicketLogonInfoRequestOptions")
	},
	{
		.name = discard_const_p(char, "service_ticket_length"),
		.get = py_netr_TicketLogonInfo_get_service_ticket_length,
		.set = py_netr_TicketLogonInfo_set_service_ticket_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "service_ticket"),
		.get = py_netr_TicketLogonInfo_get_service_ticket,
		.set = py_netr_TicketLogonInfo_set_service_ticket,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "additional_ticket_length"),
		.get = py_netr_TicketLogonInfo_get_additional_ticket_length,
		.set = py_netr_TicketLogonInfo_set_additional_ticket_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "additional_ticket"),
		.get = py_netr_TicketLogonInfo_get_additional_ticket,
		.set = py_netr_TicketLogonInfo_set_additional_ticket,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_TicketLogonInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_TicketLogonInfo);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_TicketLogonInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_TicketLogonInfo);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_TicketLogonInfo);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_TicketLogonInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_TicketLogonInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_TicketLogonInfo, "netr_TicketLogonInfo", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_TicketLogonInfo, "netr_TicketLogonInfo", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_TicketLogonInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_TicketLogonInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_TicketLogonInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_TicketLogonInfo_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_TicketLogonInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_TicketLogonInfo",
	.tp_getset = py_netr_TicketLogonInfo_getsetters,
	.tp_methods = py_netr_TicketLogonInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_TicketLogonInfo_new,
};

static PyObject *py_import_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, union netr_LogonLevel *in)
{
	PyObject *ret;

	switch (level) {
		case NetlogonInteractiveInformation:
			if (in->password == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
			}
			return ret;

		case NetlogonNetworkInformation:
			if (in->network == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
			}
			return ret;

		case NetlogonServiceInformation:
			if (in->password == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
			}
			return ret;

		case NetlogonGenericInformation:
			if (in->generic == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_GenericInfo_Type, in->generic, in->generic);
			}
			return ret;

		case NetlogonInteractiveTransitiveInformation:
			if (in->password == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
			}
			return ret;

		case NetlogonNetworkTransitiveInformation:
			if (in->network == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
			}
			return ret;

		case NetlogonServiceTransitiveInformation:
			if (in->password == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
			}
			return ret;

		case NetlogonTicketLogonInformation:
			if (in->ticket == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_TicketLogonInfo_Type, in->ticket, in->ticket);
			}
			return ret;

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

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

static union netr_LogonLevel *py_export_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_LogonLevel *ret = talloc_zero(mem_ctx, union netr_LogonLevel);
	switch (level) {
		case NetlogonInteractiveInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->password = NULL;
			} else {
				ret->password = NULL;
				PY_CHECK_TYPE(&netr_PasswordInfo_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->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonNetworkInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->network");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->network = NULL;
			} else {
				ret->network = NULL;
				PY_CHECK_TYPE(&netr_NetworkInfo_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->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonServiceInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->password = NULL;
			} else {
				ret->password = NULL;
				PY_CHECK_TYPE(&netr_PasswordInfo_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->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonGenericInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->generic");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->generic = NULL;
			} else {
				ret->generic = NULL;
				PY_CHECK_TYPE(&netr_GenericInfo_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->generic = (struct netr_GenericInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonInteractiveTransitiveInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->password = NULL;
			} else {
				ret->password = NULL;
				PY_CHECK_TYPE(&netr_PasswordInfo_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->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonNetworkTransitiveInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->network");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->network = NULL;
			} else {
				ret->network = NULL;
				PY_CHECK_TYPE(&netr_NetworkInfo_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->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonServiceTransitiveInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->password");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->password = NULL;
			} else {
				ret->password = NULL;
				PY_CHECK_TYPE(&netr_PasswordInfo_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->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonTicketLogonInformation:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ticket");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->ticket = NULL;
			} else {
				ret->ticket = NULL;
				PY_CHECK_TYPE(&netr_TicketLogonInfo_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->ticket = (struct netr_TicketLogonInfo *)pytalloc_get_ptr(in);
			}
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_LogonLevel_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_LogonLevel *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_LogonLevel *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_LogonLevel!");
		return NULL;
	}

	return py_import_netr_LogonLevel(mem_ctx, level, in);
}

static PyObject *py_netr_LogonLevel_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_LogonLevel *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_LogonLevel(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_LogonLevel_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_LogonLevel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_LogonLevel_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonLevel",
	.tp_getset = NULL,
	.tp_methods = py_netr_LogonLevel_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonLevel_new,
};


static PyObject *py_netr_UserSessionKey_get_key(PyObject *obj, void *closure)
{
	struct netr_UserSessionKey *object = pytalloc_get_ptr(obj);
	PyObject *py_key;
	py_key = PyList_New(16);
	if (py_key == NULL) {
		return NULL;
	}
	{
		int key_cntr_0;
		for (key_cntr_0 = 0; key_cntr_0 < (16); key_cntr_0++) {
			PyObject *py_key_0;
			py_key_0 = PyLong_FromLong((uint16_t)((object->key)[key_cntr_0]));
			PyList_SetItem(py_key, key_cntr_0, py_key_0);
		}
	}
	return py_key;
}

static int py_netr_UserSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->key");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int key_cntr_0;
		if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->key),  PyList_GET_SIZE(value));
			return -1;
		}
		for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
			if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->key)[key_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->key)[key_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->key)[key_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_UserSessionKey_getsetters[] = {
	{
		.name = discard_const_p(char, "key"),
		.get = py_netr_UserSessionKey_get_key,
		.set = py_netr_UserSessionKey_set_key,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_UserSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_UserSessionKey);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_UserSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_UserSessionKey);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_UserSessionKey_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_UserSessionKey *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_UserSessionKey, "netr_UserSessionKey", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_UserSessionKey, "netr_UserSessionKey", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_UserSessionKey_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_UserSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_UserSessionKey_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_UserSessionKey_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_UserSessionKey_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_UserSessionKey",
	.tp_getset = py_netr_UserSessionKey_getsetters,
	.tp_methods = py_netr_UserSessionKey_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_UserSessionKey_new,
};


static PyObject *py_netr_LMSessionKey_get_key(PyObject *obj, void *closure)
{
	struct netr_LMSessionKey *object = pytalloc_get_ptr(obj);
	PyObject *py_key;
	py_key = PyList_New(8);
	if (py_key == NULL) {
		return NULL;
	}
	{
		int key_cntr_0;
		for (key_cntr_0 = 0; key_cntr_0 < (8); key_cntr_0++) {
			PyObject *py_key_0;
			py_key_0 = PyLong_FromLong((uint16_t)((object->key)[key_cntr_0]));
			PyList_SetItem(py_key, key_cntr_0, py_key_0);
		}
	}
	return py_key;
}

static int py_netr_LMSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->key");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int key_cntr_0;
		if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->key),  PyList_GET_SIZE(value));
			return -1;
		}
		for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
			if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->key)[key_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->key)[key_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->key)[key_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_LMSessionKey_getsetters[] = {
	{
		.name = discard_const_p(char, "key"),
		.get = py_netr_LMSessionKey_get_key,
		.set = py_netr_LMSessionKey_set_key,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_LMSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_LMSessionKey);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_LMSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_LMSessionKey);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_LMSessionKey_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_LMSessionKey *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_LMSessionKey, "netr_LMSessionKey", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_LMSessionKey, "netr_LMSessionKey", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_LMSessionKey_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_LMSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LMSessionKey_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LMSessionKey_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LMSessionKey_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LMSessionKey",
	.tp_getset = py_netr_LMSessionKey_getsetters,
	.tp_methods = py_netr_LMSessionKey_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LMSessionKey_new,
};


static PyObject *py_netr_SamBaseInfo_get_logon_time(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_time;
	py_logon_time = PyLong_FromUnsignedLongLong(object->logon_time);
	return py_logon_time;
}

static int py_netr_SamBaseInfo_set_logon_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_time");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_time));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_logoff_time(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logoff_time;
	py_logoff_time = PyLong_FromUnsignedLongLong(object->logoff_time);
	return py_logoff_time;
}

static int py_netr_SamBaseInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logoff_time");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logoff_time));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logoff_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_kickoff_time(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_kickoff_time;
	py_kickoff_time = PyLong_FromUnsignedLongLong(object->kickoff_time);
	return py_kickoff_time;
}

static int py_netr_SamBaseInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->kickoff_time");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->kickoff_time));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->kickoff_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_last_password_change(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_last_password_change;
	py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
	return py_last_password_change;
}

static int py_netr_SamBaseInfo_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_password_change");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->last_password_change = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_allow_password_change(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_allow_password_change;
	py_allow_password_change = PyLong_FromUnsignedLongLong(object->allow_password_change);
	return py_allow_password_change;
}

static int py_netr_SamBaseInfo_set_allow_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->allow_password_change");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->allow_password_change));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->allow_password_change = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_force_password_change(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_force_password_change;
	py_force_password_change = PyLong_FromUnsignedLongLong(object->force_password_change);
	return py_force_password_change;
}

static int py_netr_SamBaseInfo_set_force_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->force_password_change");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->force_password_change));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->force_password_change = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_account_name(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_netr_SamBaseInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_full_name(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_netr_SamBaseInfo_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->full_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_logon_script(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_script;
	py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
	return py_logon_script;
}

static int py_netr_SamBaseInfo_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_script");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_profile_path(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_profile_path;
	py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
	return py_profile_path;
}

static int py_netr_SamBaseInfo_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->profile_path");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_home_directory(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_home_directory;
	py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
	return py_home_directory;
}

static int py_netr_SamBaseInfo_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_directory");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_home_drive(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_home_drive;
	py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
	return py_home_drive;
}

static int py_netr_SamBaseInfo_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_drive");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_logon_count(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_count;
	py_logon_count = PyLong_FromLong((uint16_t)(object->logon_count));
	return py_logon_count;
}

static int py_netr_SamBaseInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_bad_password_count(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_bad_password_count;
	py_bad_password_count = PyLong_FromLong((uint16_t)(object->bad_password_count));
	return py_bad_password_count;
}

static int py_netr_SamBaseInfo_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_password_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->bad_password_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_rid(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
	return py_rid;
}

static int py_netr_SamBaseInfo_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_primary_gid(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_primary_gid;
	py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)(object->primary_gid));
	return py_primary_gid;
}

static int py_netr_SamBaseInfo_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_gid");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->primary_gid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_groups(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_groups;
	py_groups = pytalloc_reference_ex(samr_RidWithAttributeArray_Type, pytalloc_get_mem_ctx(obj), &object->groups);
	return py_groups;
}

static int py_netr_SamBaseInfo_set_groups(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->groups");
		return -1;
	}
	PY_CHECK_TYPE(samr_RidWithAttributeArray_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->groups = *(struct samr_RidWithAttributeArray *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_user_flags(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_user_flags;
	py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->user_flags));
	return py_user_flags;
}

static int py_netr_SamBaseInfo_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->user_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_key(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_key;
	py_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->key);
	return py_key;
}

static int py_netr_SamBaseInfo_set_key(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->key");
		return -1;
	}
	PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	py_logon_server = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
	return py_logon_server;
}

static int py_netr_SamBaseInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_server");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_server = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_logon_domain(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_domain;
	py_logon_domain = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
	return py_logon_domain;
}

static int py_netr_SamBaseInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_domain");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_domain = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_domain_sid(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_sid;
	if (object->domain_sid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->domain_sid == NULL) {
		py_domain_sid = Py_None;
		Py_INCREF(py_domain_sid);
	} else {
		py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
	}
	return py_domain_sid;
}

static int py_netr_SamBaseInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_sid");
		return -1;
	}
	if (value == Py_None) {
		object->domain_sid = NULL;
	} else {
		object->domain_sid = NULL;
		PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_LMSessKey(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_LMSessKey;
	py_LMSessKey = pytalloc_reference_ex(&netr_LMSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->LMSessKey);
	return py_LMSessKey;
}

static int py_netr_SamBaseInfo_set_LMSessKey(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->LMSessKey");
		return -1;
	}
	PY_CHECK_TYPE(&netr_LMSessionKey_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->LMSessKey = *(struct netr_LMSessionKey *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_acct_flags(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->acct_flags));
	return py_acct_flags;
}

static int py_netr_SamBaseInfo_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acct_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->acct_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_sub_auth_status(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_sub_auth_status;
	py_sub_auth_status = PyLong_FromUnsignedLongLong((uint32_t)(object->sub_auth_status));
	return py_sub_auth_status;
}

static int py_netr_SamBaseInfo_set_sub_auth_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sub_auth_status");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sub_auth_status));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->sub_auth_status = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_last_successful_logon(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_last_successful_logon;
	py_last_successful_logon = PyLong_FromUnsignedLongLong(object->last_successful_logon);
	return py_last_successful_logon;
}

static int py_netr_SamBaseInfo_set_last_successful_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_successful_logon");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_successful_logon));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->last_successful_logon = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_last_failed_logon(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_last_failed_logon;
	py_last_failed_logon = PyLong_FromUnsignedLongLong(object->last_failed_logon);
	return py_last_failed_logon;
}

static int py_netr_SamBaseInfo_set_last_failed_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_failed_logon");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_failed_logon));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->last_failed_logon = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_failed_logon_count(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_failed_logon_count;
	py_failed_logon_count = PyLong_FromUnsignedLongLong((uint32_t)(object->failed_logon_count));
	return py_failed_logon_count;
}

static int py_netr_SamBaseInfo_set_failed_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->failed_logon_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->failed_logon_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->failed_logon_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamBaseInfo_get_reserved(PyObject *obj, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_reserved;
	py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
	return py_reserved;
}

static int py_netr_SamBaseInfo_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamBaseInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->reserved = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_SamBaseInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "logon_time"),
		.get = py_netr_SamBaseInfo_get_logon_time,
		.set = py_netr_SamBaseInfo_set_logon_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "logoff_time"),
		.get = py_netr_SamBaseInfo_get_logoff_time,
		.set = py_netr_SamBaseInfo_set_logoff_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "kickoff_time"),
		.get = py_netr_SamBaseInfo_get_kickoff_time,
		.set = py_netr_SamBaseInfo_set_kickoff_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "last_password_change"),
		.get = py_netr_SamBaseInfo_get_last_password_change,
		.set = py_netr_SamBaseInfo_set_last_password_change,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "allow_password_change"),
		.get = py_netr_SamBaseInfo_get_allow_password_change,
		.set = py_netr_SamBaseInfo_set_allow_password_change,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "force_password_change"),
		.get = py_netr_SamBaseInfo_get_force_password_change,
		.set = py_netr_SamBaseInfo_set_force_password_change,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "account_name"),
		.get = py_netr_SamBaseInfo_get_account_name,
		.set = py_netr_SamBaseInfo_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "full_name"),
		.get = py_netr_SamBaseInfo_get_full_name,
		.set = py_netr_SamBaseInfo_set_full_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "logon_script"),
		.get = py_netr_SamBaseInfo_get_logon_script,
		.set = py_netr_SamBaseInfo_set_logon_script,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "profile_path"),
		.get = py_netr_SamBaseInfo_get_profile_path,
		.set = py_netr_SamBaseInfo_set_profile_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "home_directory"),
		.get = py_netr_SamBaseInfo_get_home_directory,
		.set = py_netr_SamBaseInfo_set_home_directory,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "home_drive"),
		.get = py_netr_SamBaseInfo_get_home_drive,
		.set = py_netr_SamBaseInfo_set_home_drive,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "logon_count"),
		.get = py_netr_SamBaseInfo_get_logon_count,
		.set = py_netr_SamBaseInfo_set_logon_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "bad_password_count"),
		.get = py_netr_SamBaseInfo_get_bad_password_count,
		.set = py_netr_SamBaseInfo_set_bad_password_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "rid"),
		.get = py_netr_SamBaseInfo_get_rid,
		.set = py_netr_SamBaseInfo_set_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "primary_gid"),
		.get = py_netr_SamBaseInfo_get_primary_gid,
		.set = py_netr_SamBaseInfo_set_primary_gid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "groups"),
		.get = py_netr_SamBaseInfo_get_groups,
		.set = py_netr_SamBaseInfo_set_groups,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_RidWithAttributeArray")
	},
	{
		.name = discard_const_p(char, "user_flags"),
		.get = py_netr_SamBaseInfo_get_user_flags,
		.set = py_netr_SamBaseInfo_set_user_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UserFlags")
	},
	{
		.name = discard_const_p(char, "key"),
		.get = py_netr_SamBaseInfo_get_key,
		.set = py_netr_SamBaseInfo_set_key,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
	},
	{
		.name = discard_const_p(char, "logon_server"),
		.get = py_netr_SamBaseInfo_get_logon_server,
		.set = py_netr_SamBaseInfo_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "logon_domain"),
		.get = py_netr_SamBaseInfo_get_logon_domain,
		.set = py_netr_SamBaseInfo_set_logon_domain,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "domain_sid"),
		.get = py_netr_SamBaseInfo_get_domain_sid,
		.set = py_netr_SamBaseInfo_set_domain_sid,
		.doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
	},
	{
		.name = discard_const_p(char, "LMSessKey"),
		.get = py_netr_SamBaseInfo_get_LMSessKey,
		.set = py_netr_SamBaseInfo_set_LMSessKey,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LMSessionKey")
	},
	{
		.name = discard_const_p(char, "acct_flags"),
		.get = py_netr_SamBaseInfo_get_acct_flags,
		.set = py_netr_SamBaseInfo_set_acct_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
	},
	{
		.name = discard_const_p(char, "sub_auth_status"),
		.get = py_netr_SamBaseInfo_get_sub_auth_status,
		.set = py_netr_SamBaseInfo_set_sub_auth_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "last_successful_logon"),
		.get = py_netr_SamBaseInfo_get_last_successful_logon,
		.set = py_netr_SamBaseInfo_set_last_successful_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "last_failed_logon"),
		.get = py_netr_SamBaseInfo_get_last_failed_logon,
		.set = py_netr_SamBaseInfo_set_last_failed_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "failed_logon_count"),
		.get = py_netr_SamBaseInfo_get_failed_logon_count,
		.set = py_netr_SamBaseInfo_set_failed_logon_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "reserved"),
		.get = py_netr_SamBaseInfo_get_reserved,
		.set = py_netr_SamBaseInfo_set_reserved,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_SamBaseInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SamBaseInfo",
	.tp_getset = py_netr_SamBaseInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SamBaseInfo_new,
};


static PyObject *py_netr_SamInfo2_get_base(PyObject *obj, void *closure)
{
	struct netr_SamInfo2 *object = pytalloc_get_ptr(obj);
	PyObject *py_base;
	py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
	return py_base;
}

static int py_netr_SamInfo2_set_base(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->base");
		return -1;
	}
	PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_SamInfo2_getsetters[] = {
	{
		.name = discard_const_p(char, "base"),
		.get = py_netr_SamInfo2_get_base,
		.set = py_netr_SamInfo2_set_base,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_SamInfo2_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_SamInfo2 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SamInfo2);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_SamInfo2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SamInfo2 *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_SamInfo2);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo2);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_SamInfo2_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SamInfo2 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo2, "netr_SamInfo2", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo2, "netr_SamInfo2", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_SamInfo2_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_SamInfo2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SamInfo2_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SamInfo2_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_SamInfo2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SamInfo2",
	.tp_getset = py_netr_SamInfo2_getsetters,
	.tp_methods = py_netr_SamInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SamInfo2_new,
};


static PyObject *py_netr_SidAttr_get_sid(PyObject *obj, void *closure)
{
	struct netr_SidAttr *object = pytalloc_get_ptr(obj);
	PyObject *py_sid;
	if (object->sid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sid == NULL) {
		py_sid = Py_None;
		Py_INCREF(py_sid);
	} else {
		py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
	}
	return py_sid;
}

static int py_netr_SidAttr_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sid");
		return -1;
	}
	if (value == Py_None) {
		object->sid = NULL;
	} else {
		object->sid = NULL;
		PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_SidAttr_get_attributes(PyObject *obj, void *closure)
{
	struct netr_SidAttr *object = pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->attributes));
	return py_attributes;
}

static int py_netr_SidAttr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->attributes");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->attributes = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_SidAttr_getsetters[] = {
	{
		.name = discard_const_p(char, "sid"),
		.get = py_netr_SidAttr_get_sid,
		.set = py_netr_SidAttr_set_sid,
		.doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
	},
	{
		.name = discard_const_p(char, "attributes"),
		.get = py_netr_SidAttr_get_attributes,
		.set = py_netr_SidAttr_set_attributes,
		.doc = discard_const_p(char, "PIDL-generated element of base type security_GroupAttrs")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_SidAttr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SidAttr);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_SidAttr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_SidAttr);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_SidAttr_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SidAttr *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SidAttr, "netr_SidAttr", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SidAttr, "netr_SidAttr", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_SidAttr_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_SidAttr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SidAttr_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SidAttr_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_SidAttr_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SidAttr",
	.tp_getset = py_netr_SidAttr_getsetters,
	.tp_methods = py_netr_SidAttr_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SidAttr_new,
};


static PyObject *py_netr_SamInfo3_get_base(PyObject *obj, void *closure)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(obj);
	PyObject *py_base;
	py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
	return py_base;
}

static int py_netr_SamInfo3_set_base(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->base");
		return -1;
	}
	PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamInfo3_get_sidcount(PyObject *obj, void *closure)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(obj);
	PyObject *py_sidcount;
	py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)(object->sidcount));
	return py_sidcount;
}

static int py_netr_SamInfo3_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sidcount");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->sidcount = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamInfo3_get_sids(PyObject *obj, void *closure)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(obj);
	PyObject *py_sids;
	if (object->sids == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sids == NULL) {
		py_sids = Py_None;
		Py_INCREF(py_sids);
	} else {
		py_sids = PyList_New(object->sidcount);
		if (py_sids == NULL) {
			return NULL;
		}
		{
			int sids_cntr_1;
			for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
				PyObject *py_sids_1;
				py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &(object->sids)[sids_cntr_1]);
				PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
			}
		}
	}
	return py_sids;
}

static int py_netr_SamInfo3_set_sids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sids");
		return -1;
	}
	if (value == Py_None) {
		object->sids = NULL;
	} else {
		object->sids = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int sids_cntr_1;
			object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
			if (!object->sids) { return -1; }
			talloc_set_name_const(object->sids, "ARRAY: object->sids");
			for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
				if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sids)[sids_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
				if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->sids)[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_SamInfo3_getsetters[] = {
	{
		.name = discard_const_p(char, "base"),
		.get = py_netr_SamInfo3_get_base,
		.set = py_netr_SamInfo3_set_base,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
	},
	{
		.name = discard_const_p(char, "sidcount"),
		.get = py_netr_SamInfo3_get_sidcount,
		.set = py_netr_SamInfo3_set_sidcount,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sids"),
		.get = py_netr_SamInfo3_get_sids,
		.set = py_netr_SamInfo3_set_sids,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_SamInfo3_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SamInfo3);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_SamInfo3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_SamInfo3);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_SamInfo3_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SamInfo3 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo3, "netr_SamInfo3", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo3, "netr_SamInfo3", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_SamInfo3_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_SamInfo3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SamInfo3_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SamInfo3_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_SamInfo3_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SamInfo3",
	.tp_getset = py_netr_SamInfo3_getsetters,
	.tp_methods = py_netr_SamInfo3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SamInfo3_new,
};


static PyObject *py_netr_SamInfo6_get_base(PyObject *obj, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
	PyObject *py_base;
	py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
	return py_base;
}

static int py_netr_SamInfo6_set_base(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->base");
		return -1;
	}
	PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamInfo6_get_sidcount(PyObject *obj, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
	PyObject *py_sidcount;
	py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)(object->sidcount));
	return py_sidcount;
}

static int py_netr_SamInfo6_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sidcount");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->sidcount = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SamInfo6_get_sids(PyObject *obj, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
	PyObject *py_sids;
	if (object->sids == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sids == NULL) {
		py_sids = Py_None;
		Py_INCREF(py_sids);
	} else {
		py_sids = PyList_New(object->sidcount);
		if (py_sids == NULL) {
			return NULL;
		}
		{
			int sids_cntr_1;
			for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
				PyObject *py_sids_1;
				py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &(object->sids)[sids_cntr_1]);
				PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
			}
		}
	}
	return py_sids;
}

static int py_netr_SamInfo6_set_sids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sids");
		return -1;
	}
	if (value == Py_None) {
		object->sids = NULL;
	} else {
		object->sids = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int sids_cntr_1;
			object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
			if (!object->sids) { return -1; }
			talloc_set_name_const(object->sids, "ARRAY: object->sids");
			for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
				if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sids)[sids_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
				if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->sids)[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_netr_SamInfo6_get_dns_domainname(PyObject *obj, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_domainname;
	py_dns_domainname = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
	return py_dns_domainname;
}

static int py_netr_SamInfo6_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domainname");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dns_domainname = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamInfo6_get_principal_name(PyObject *obj, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
	PyObject *py_principal_name;
	py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
	return py_principal_name;
}

static int py_netr_SamInfo6_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->principal_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_SamInfo6_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = PyList_New(20);
	if (py_unknown4 == NULL) {
		return NULL;
	}
	{
		int unknown4_cntr_0;
		for (unknown4_cntr_0 = 0; unknown4_cntr_0 < (20); unknown4_cntr_0++) {
			PyObject *py_unknown4_0;
			py_unknown4_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->unknown4)[unknown4_cntr_0]));
			PyList_SetItem(py_unknown4, unknown4_cntr_0, py_unknown4_0);
		}
	}
	return py_unknown4;
}

static int py_netr_SamInfo6_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int unknown4_cntr_0;
		if (ARRAY_SIZE(object->unknown4) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->unknown4),  PyList_GET_SIZE(value));
			return -1;
		}
		for (unknown4_cntr_0 = 0; unknown4_cntr_0 < PyList_GET_SIZE(value); unknown4_cntr_0++) {
			if (PyList_GET_ITEM(value, unknown4_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->unknown4)[unknown4_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->unknown4)[unknown4_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, unknown4_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown4_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->unknown4)[unknown4_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_SamInfo6_getsetters[] = {
	{
		.name = discard_const_p(char, "base"),
		.get = py_netr_SamInfo6_get_base,
		.set = py_netr_SamInfo6_set_base,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
	},
	{
		.name = discard_const_p(char, "sidcount"),
		.get = py_netr_SamInfo6_get_sidcount,
		.set = py_netr_SamInfo6_set_sidcount,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sids"),
		.get = py_netr_SamInfo6_get_sids,
		.set = py_netr_SamInfo6_set_sids,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
	},
	{
		.name = discard_const_p(char, "dns_domainname"),
		.get = py_netr_SamInfo6_get_dns_domainname,
		.set = py_netr_SamInfo6_set_dns_domainname,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "principal_name"),
		.get = py_netr_SamInfo6_get_principal_name,
		.set = py_netr_SamInfo6_set_principal_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_SamInfo6_get_unknown4,
		.set = py_netr_SamInfo6_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_SamInfo6_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SamInfo6);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_SamInfo6_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_SamInfo6);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo6);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_SamInfo6_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SamInfo6 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo6, "netr_SamInfo6", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo6, "netr_SamInfo6", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_SamInfo6_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_SamInfo6_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SamInfo6_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SamInfo6_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_SamInfo6_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SamInfo6",
	.tp_getset = py_netr_SamInfo6_getsetters,
	.tp_methods = py_netr_SamInfo6_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SamInfo6_new,
};


static PyObject *py_netr_PacInfo_get_pac_size(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_pac_size;
	py_pac_size = PyLong_FromUnsignedLongLong((uint32_t)(object->pac_size));
	return py_pac_size;
}

static int py_netr_PacInfo_set_pac_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pac_size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac_size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->pac_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PacInfo_get_pac(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_pac;
	if (object->pac == NULL) {
		Py_RETURN_NONE;
	}
	if (object->pac == NULL) {
		py_pac = Py_None;
		Py_INCREF(py_pac);
	} else {
		py_pac = PyList_New(object->pac_size);
		if (py_pac == NULL) {
			return NULL;
		}
		{
			int pac_cntr_1;
			for (pac_cntr_1 = 0; pac_cntr_1 < (object->pac_size); pac_cntr_1++) {
				PyObject *py_pac_1;
				py_pac_1 = PyLong_FromLong((uint16_t)((object->pac)[pac_cntr_1]));
				PyList_SetItem(py_pac, pac_cntr_1, py_pac_1);
			}
		}
	}
	return py_pac;
}

static int py_netr_PacInfo_set_pac(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pac));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pac");
		return -1;
	}
	if (value == Py_None) {
		object->pac = NULL;
	} else {
		object->pac = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int pac_cntr_1;
			object->pac = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pac, PyList_GET_SIZE(value));
			if (!object->pac) { return -1; }
			talloc_set_name_const(object->pac, "ARRAY: object->pac");
			for (pac_cntr_1 = 0; pac_cntr_1 < PyList_GET_SIZE(value); pac_cntr_1++) {
				if (PyList_GET_ITEM(value, pac_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->pac)[pac_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->pac)[pac_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, pac_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, pac_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->pac)[pac_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_PacInfo_get_logon_domain(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_domain;
	py_logon_domain = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
	return py_logon_domain;
}

static int py_netr_PacInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_domain");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_domain = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PacInfo_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	py_logon_server = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
	return py_logon_server;
}

static int py_netr_PacInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_server");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_server = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PacInfo_get_principal_name(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_principal_name;
	py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
	return py_principal_name;
}

static int py_netr_PacInfo_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->principal_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PacInfo_get_auth_size(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_auth_size;
	py_auth_size = PyLong_FromUnsignedLongLong((uint32_t)(object->auth_size));
	return py_auth_size;
}

static int py_netr_PacInfo_set_auth_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auth_size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->auth_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PacInfo_get_auth(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_auth;
	if (object->auth == NULL) {
		Py_RETURN_NONE;
	}
	if (object->auth == NULL) {
		py_auth = Py_None;
		Py_INCREF(py_auth);
	} else {
		py_auth = PyList_New(object->auth_size);
		if (py_auth == NULL) {
			return NULL;
		}
		{
			int auth_cntr_1;
			for (auth_cntr_1 = 0; auth_cntr_1 < (object->auth_size); auth_cntr_1++) {
				PyObject *py_auth_1;
				py_auth_1 = PyLong_FromLong((uint16_t)((object->auth)[auth_cntr_1]));
				PyList_SetItem(py_auth, auth_cntr_1, py_auth_1);
			}
		}
	}
	return py_auth;
}

static int py_netr_PacInfo_set_auth(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->auth));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auth");
		return -1;
	}
	if (value == Py_None) {
		object->auth = NULL;
	} else {
		object->auth = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int auth_cntr_1;
			object->auth = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->auth, PyList_GET_SIZE(value));
			if (!object->auth) { return -1; }
			talloc_set_name_const(object->auth, "ARRAY: object->auth");
			for (auth_cntr_1 = 0; auth_cntr_1 < PyList_GET_SIZE(value); auth_cntr_1++) {
				if (PyList_GET_ITEM(value, auth_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->auth)[auth_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->auth)[auth_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, auth_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, auth_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->auth)[auth_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_PacInfo_get_user_session_key(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_user_session_key;
	py_user_session_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->user_session_key);
	return py_user_session_key;
}

static int py_netr_PacInfo_set_user_session_key(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_session_key");
		return -1;
	}
	PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->user_session_key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PacInfo_get_expansionroom(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_expansionroom;
	py_expansionroom = PyList_New(10);
	if (py_expansionroom == NULL) {
		return NULL;
	}
	{
		int expansionroom_cntr_0;
		for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < (10); expansionroom_cntr_0++) {
			PyObject *py_expansionroom_0;
			py_expansionroom_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->expansionroom)[expansionroom_cntr_0]));
			PyList_SetItem(py_expansionroom, expansionroom_cntr_0, py_expansionroom_0);
		}
	}
	return py_expansionroom;
}

static int py_netr_PacInfo_set_expansionroom(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->expansionroom");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int expansionroom_cntr_0;
		if (ARRAY_SIZE(object->expansionroom) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->expansionroom),  PyList_GET_SIZE(value));
			return -1;
		}
		for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < PyList_GET_SIZE(value); expansionroom_cntr_0++) {
			if (PyList_GET_ITEM(value, expansionroom_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->expansionroom)[expansionroom_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->expansionroom)[expansionroom_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, expansionroom_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, expansionroom_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->expansionroom)[expansionroom_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_PacInfo_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_PacInfo_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PacInfo_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_PacInfo_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PacInfo_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_PacInfo_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_PacInfo_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_PacInfo_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_PacInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "pac_size"),
		.get = py_netr_PacInfo_get_pac_size,
		.set = py_netr_PacInfo_set_pac_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "pac"),
		.get = py_netr_PacInfo_get_pac,
		.set = py_netr_PacInfo_set_pac,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "logon_domain"),
		.get = py_netr_PacInfo_get_logon_domain,
		.set = py_netr_PacInfo_set_logon_domain,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "logon_server"),
		.get = py_netr_PacInfo_get_logon_server,
		.set = py_netr_PacInfo_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "principal_name"),
		.get = py_netr_PacInfo_get_principal_name,
		.set = py_netr_PacInfo_set_principal_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "auth_size"),
		.get = py_netr_PacInfo_get_auth_size,
		.set = py_netr_PacInfo_set_auth_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "auth"),
		.get = py_netr_PacInfo_get_auth,
		.set = py_netr_PacInfo_set_auth,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "user_session_key"),
		.get = py_netr_PacInfo_get_user_session_key,
		.set = py_netr_PacInfo_set_user_session_key,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
	},
	{
		.name = discard_const_p(char, "expansionroom"),
		.get = py_netr_PacInfo_get_expansionroom,
		.set = py_netr_PacInfo_set_expansionroom,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_PacInfo_get_unknown1,
		.set = py_netr_PacInfo_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_PacInfo_get_unknown2,
		.set = py_netr_PacInfo_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_PacInfo_get_unknown3,
		.set = py_netr_PacInfo_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_PacInfo_get_unknown4,
		.set = py_netr_PacInfo_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_PacInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_PacInfo);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_PacInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_PacInfo);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_PacInfo);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_PacInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_PacInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_PacInfo, "netr_PacInfo", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_PacInfo, "netr_PacInfo", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_PacInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_PacInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_PacInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_PacInfo_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_PacInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_PacInfo",
	.tp_getset = py_netr_PacInfo_getsetters,
	.tp_methods = py_netr_PacInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_PacInfo_new,
};


static PyObject *py_netr_GenericInfo2_get_length(PyObject *obj, void *closure)
{
	struct netr_GenericInfo2 *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
	return py_length;
}

static int py_netr_GenericInfo2_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GenericInfo2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_GenericInfo2_get_data(PyObject *obj, void *closure)
{
	struct netr_GenericInfo2 *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		Py_RETURN_NONE;
	}
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyList_New(object->length);
		if (py_data == NULL) {
			return NULL;
		}
		{
			int data_cntr_1;
			for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
				PyObject *py_data_1;
				py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
				PyList_SetItem(py_data, data_cntr_1, py_data_1);
			}
		}
	}
	return py_data;
}

static int py_netr_GenericInfo2_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GenericInfo2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
		return -1;
	}
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int data_cntr_1;
			object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
			if (!object->data) { return -1; }
			talloc_set_name_const(object->data, "ARRAY: object->data");
			for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
				if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->data)[data_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_GenericInfo2_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_GenericInfo2_get_length,
		.set = py_netr_GenericInfo2_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "data"),
		.get = py_netr_GenericInfo2_get_data,
		.set = py_netr_GenericInfo2_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_GenericInfo2_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_GenericInfo2 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_GenericInfo2);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_GenericInfo2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_GenericInfo2 *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_GenericInfo2);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_GenericInfo2);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_GenericInfo2_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_GenericInfo2 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_GenericInfo2, "netr_GenericInfo2", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_GenericInfo2, "netr_GenericInfo2", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_GenericInfo2_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_GenericInfo2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GenericInfo2_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GenericInfo2_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_GenericInfo2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_GenericInfo2",
	.tp_getset = py_netr_GenericInfo2_getsetters,
	.tp_methods = py_netr_GenericInfo2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_GenericInfo2_new,
};


static PyObject *py_netr_ValidationTicketLogon_get_results(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_results;
	py_results = PyLong_FromUnsignedLongLong(object->results);
	return py_results;
}

static int py_netr_ValidationTicketLogon_set_results(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->results");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->results));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->results = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_kerberos_status(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_kerberos_status;
	py_kerberos_status = PyErr_FromNTSTATUS(object->kerberos_status);
	return py_kerberos_status;
}

static int py_netr_ValidationTicketLogon_set_kerberos_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->kerberos_status");
		return -1;
	}
	object->kerberos_status = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_netlogon_status(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_netlogon_status;
	py_netlogon_status = PyErr_FromNTSTATUS(object->netlogon_status);
	return py_netlogon_status;
}

static int py_netr_ValidationTicketLogon_set_netlogon_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->netlogon_status");
		return -1;
	}
	object->netlogon_status = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_source_of_status(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_source_of_status;
	py_source_of_status = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->source_of_status);
	return py_source_of_status;
}

static int py_netr_ValidationTicketLogon_set_source_of_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->source_of_status");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->source_of_status = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_user_information(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_user_information;
	if (object->user_information == NULL) {
		Py_RETURN_NONE;
	}
	if (object->user_information == NULL) {
		py_user_information = Py_None;
		Py_INCREF(py_user_information);
	} else {
		py_user_information = pytalloc_reference_ex(&netr_SamInfo6_Type, object->user_information, object->user_information);
	}
	return py_user_information;
}

static int py_netr_ValidationTicketLogon_set_user_information(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->user_information));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_information");
		return -1;
	}
	if (value == Py_None) {
		object->user_information = NULL;
	} else {
		object->user_information = NULL;
		PY_CHECK_TYPE(&netr_SamInfo6_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->user_information = (struct netr_SamInfo6 *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_device_information(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_device_information;
	if (object->device_information == NULL) {
		Py_RETURN_NONE;
	}
	if (object->device_information == NULL) {
		py_device_information = Py_None;
		Py_INCREF(py_device_information);
	} else {
		py_device_information = pytalloc_reference_ex(&netr_SamInfo6_Type, object->device_information, object->device_information);
	}
	return py_device_information;
}

static int py_netr_ValidationTicketLogon_set_device_information(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->device_information));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->device_information");
		return -1;
	}
	if (value == Py_None) {
		object->device_information = NULL;
	} else {
		object->device_information = NULL;
		PY_CHECK_TYPE(&netr_SamInfo6_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->device_information = (struct netr_SamInfo6 *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_user_claims_length(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_user_claims_length;
	py_user_claims_length = PyLong_FromUnsignedLongLong((uint32_t)(object->user_claims_length));
	return py_user_claims_length;
}

static int py_netr_ValidationTicketLogon_set_user_claims_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_claims_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_claims_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->user_claims_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_user_claims(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_user_claims;
	if (object->user_claims == NULL) {
		Py_RETURN_NONE;
	}
	if (object->user_claims == NULL) {
		py_user_claims = Py_None;
		Py_INCREF(py_user_claims);
	} else {
		py_user_claims = PyList_New(object->user_claims_length);
		if (py_user_claims == NULL) {
			return NULL;
		}
		{
			int user_claims_cntr_1;
			for (user_claims_cntr_1 = 0; user_claims_cntr_1 < (object->user_claims_length); user_claims_cntr_1++) {
				PyObject *py_user_claims_1;
				py_user_claims_1 = PyLong_FromLong((uint16_t)((object->user_claims)[user_claims_cntr_1]));
				PyList_SetItem(py_user_claims, user_claims_cntr_1, py_user_claims_1);
			}
		}
	}
	return py_user_claims;
}

static int py_netr_ValidationTicketLogon_set_user_claims(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->user_claims));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_claims");
		return -1;
	}
	if (value == Py_None) {
		object->user_claims = NULL;
	} else {
		object->user_claims = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int user_claims_cntr_1;
			object->user_claims = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->user_claims, PyList_GET_SIZE(value));
			if (!object->user_claims) { return -1; }
			talloc_set_name_const(object->user_claims, "ARRAY: object->user_claims");
			for (user_claims_cntr_1 = 0; user_claims_cntr_1 < PyList_GET_SIZE(value); user_claims_cntr_1++) {
				if (PyList_GET_ITEM(value, user_claims_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->user_claims)[user_claims_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->user_claims)[user_claims_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, user_claims_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, user_claims_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->user_claims)[user_claims_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_device_claims_length(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_device_claims_length;
	py_device_claims_length = PyLong_FromUnsignedLongLong((uint32_t)(object->device_claims_length));
	return py_device_claims_length;
}

static int py_netr_ValidationTicketLogon_set_device_claims_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->device_claims_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->device_claims_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->device_claims_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ValidationTicketLogon_get_device_claims(PyObject *obj, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_device_claims;
	if (object->device_claims == NULL) {
		Py_RETURN_NONE;
	}
	if (object->device_claims == NULL) {
		py_device_claims = Py_None;
		Py_INCREF(py_device_claims);
	} else {
		py_device_claims = PyList_New(object->device_claims_length);
		if (py_device_claims == NULL) {
			return NULL;
		}
		{
			int device_claims_cntr_1;
			for (device_claims_cntr_1 = 0; device_claims_cntr_1 < (object->device_claims_length); device_claims_cntr_1++) {
				PyObject *py_device_claims_1;
				py_device_claims_1 = PyLong_FromLong((uint16_t)((object->device_claims)[device_claims_cntr_1]));
				PyList_SetItem(py_device_claims, device_claims_cntr_1, py_device_claims_1);
			}
		}
	}
	return py_device_claims;
}

static int py_netr_ValidationTicketLogon_set_device_claims(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->device_claims));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->device_claims");
		return -1;
	}
	if (value == Py_None) {
		object->device_claims = NULL;
	} else {
		object->device_claims = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int device_claims_cntr_1;
			object->device_claims = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->device_claims, PyList_GET_SIZE(value));
			if (!object->device_claims) { return -1; }
			talloc_set_name_const(object->device_claims, "ARRAY: object->device_claims");
			for (device_claims_cntr_1 = 0; device_claims_cntr_1 < PyList_GET_SIZE(value); device_claims_cntr_1++) {
				if (PyList_GET_ITEM(value, device_claims_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->device_claims)[device_claims_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->device_claims)[device_claims_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, device_claims_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, device_claims_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->device_claims)[device_claims_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_ValidationTicketLogon_getsetters[] = {
	{
		.name = discard_const_p(char, "results"),
		.get = py_netr_ValidationTicketLogon_get_results,
		.set = py_netr_ValidationTicketLogon_set_results,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_TicketLogonResults")
	},
	{
		.name = discard_const_p(char, "kerberos_status"),
		.get = py_netr_ValidationTicketLogon_get_kerberos_status,
		.set = py_netr_ValidationTicketLogon_set_kerberos_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTSTATUS")
	},
	{
		.name = discard_const_p(char, "netlogon_status"),
		.get = py_netr_ValidationTicketLogon_get_netlogon_status,
		.set = py_netr_ValidationTicketLogon_set_netlogon_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTSTATUS")
	},
	{
		.name = discard_const_p(char, "source_of_status"),
		.get = py_netr_ValidationTicketLogon_get_source_of_status,
		.set = py_netr_ValidationTicketLogon_set_source_of_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "user_information"),
		.get = py_netr_ValidationTicketLogon_get_user_information,
		.set = py_netr_ValidationTicketLogon_set_user_information,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamInfo6")
	},
	{
		.name = discard_const_p(char, "device_information"),
		.get = py_netr_ValidationTicketLogon_get_device_information,
		.set = py_netr_ValidationTicketLogon_set_device_information,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamInfo6")
	},
	{
		.name = discard_const_p(char, "user_claims_length"),
		.get = py_netr_ValidationTicketLogon_get_user_claims_length,
		.set = py_netr_ValidationTicketLogon_set_user_claims_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "user_claims"),
		.get = py_netr_ValidationTicketLogon_get_user_claims,
		.set = py_netr_ValidationTicketLogon_set_user_claims,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "device_claims_length"),
		.get = py_netr_ValidationTicketLogon_get_device_claims_length,
		.set = py_netr_ValidationTicketLogon_set_device_claims_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "device_claims"),
		.get = py_netr_ValidationTicketLogon_get_device_claims,
		.set = py_netr_ValidationTicketLogon_set_device_claims,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_ValidationTicketLogon_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_ValidationTicketLogon);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_ValidationTicketLogon_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_ValidationTicketLogon);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ValidationTicketLogon);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_ValidationTicketLogon_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_ValidationTicketLogon *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_ValidationTicketLogon, "netr_ValidationTicketLogon", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_ValidationTicketLogon, "netr_ValidationTicketLogon", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_ValidationTicketLogon_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_ValidationTicketLogon_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ValidationTicketLogon_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ValidationTicketLogon_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ValidationTicketLogon_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ValidationTicketLogon",
	.tp_getset = py_netr_ValidationTicketLogon_getsetters,
	.tp_methods = py_netr_ValidationTicketLogon_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ValidationTicketLogon_new,
};

static PyObject *py_import_netr_Validation(TALLOC_CTX *mem_ctx, int level, union netr_Validation *in)
{
	PyObject *ret;

	switch (level) {
		case NetlogonValidationSamInfo:
			if (in->sam2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_SamInfo2_Type, in->sam2, in->sam2);
			}
			return ret;

		case NetlogonValidationSamInfo2:
			if (in->sam3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_SamInfo3_Type, in->sam3, in->sam3);
			}
			return ret;

		case 4:
			if (in->pac == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_PacInfo_Type, in->pac, in->pac);
			}
			return ret;

		case NetlogonValidationGenericInfo2:
			if (in->generic == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_GenericInfo2_Type, in->generic, in->generic);
			}
			return ret;

		case NetlogonValidationSamInfo4:
			if (in->sam6 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_SamInfo6_Type, in->sam6, in->sam6);
			}
			return ret;

		case NetlogonValidationTicketLogon:
			if (in->ticket == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_ValidationTicketLogon_Type, in->ticket, in->ticket);
			}
			return ret;

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

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

static union netr_Validation *py_export_netr_Validation(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_Validation *ret = talloc_zero(mem_ctx, union netr_Validation);
	switch (level) {
		case NetlogonValidationSamInfo:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sam2");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sam2 = NULL;
			} else {
				ret->sam2 = NULL;
				PY_CHECK_TYPE(&netr_SamInfo2_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->sam2 = (struct netr_SamInfo2 *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonValidationSamInfo2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sam3");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sam3 = NULL;
			} else {
				ret->sam3 = NULL;
				PY_CHECK_TYPE(&netr_SamInfo3_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->sam3 = (struct netr_SamInfo3 *)pytalloc_get_ptr(in);
			}
			break;

		case 4:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->pac");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->pac = NULL;
			} else {
				ret->pac = NULL;
				PY_CHECK_TYPE(&netr_PacInfo_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->pac = (struct netr_PacInfo *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonValidationGenericInfo2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->generic");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->generic = NULL;
			} else {
				ret->generic = NULL;
				PY_CHECK_TYPE(&netr_GenericInfo2_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->generic = (struct netr_GenericInfo2 *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonValidationSamInfo4:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sam6");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sam6 = NULL;
			} else {
				ret->sam6 = NULL;
				PY_CHECK_TYPE(&netr_SamInfo6_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->sam6 = (struct netr_SamInfo6 *)pytalloc_get_ptr(in);
			}
			break;

		case NetlogonValidationTicketLogon:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ticket");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->ticket = NULL;
			} else {
				ret->ticket = NULL;
				PY_CHECK_TYPE(&netr_ValidationTicketLogon_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->ticket = (struct netr_ValidationTicketLogon *)pytalloc_get_ptr(in);
			}
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_Validation_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_Validation *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_Validation *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Validation!");
		return NULL;
	}

	return py_import_netr_Validation(mem_ctx, level, in);
}

static PyObject *py_netr_Validation_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_Validation *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_Validation(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_Validation_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_Validation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_Validation_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_Validation",
	.tp_getset = NULL,
	.tp_methods = py_netr_Validation_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_Validation_new,
};


static PyObject *py_netr_Credential_get_data(PyObject *obj, void *closure)
{
	struct netr_Credential *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	py_data = PyList_New(8);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_0;
		for (data_cntr_0 = 0; data_cntr_0 < (8); data_cntr_0++) {
			PyObject *py_data_0;
			py_data_0 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_0]));
			PyList_SetItem(py_data, data_cntr_0, py_data_0);
		}
	}
	return py_data;
}

static int py_netr_Credential_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_Credential *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int data_cntr_0;
		if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->data),  PyList_GET_SIZE(value));
			return -1;
		}
		for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
			if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->data)[data_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_Credential_getsetters[] = {
	{
		.name = discard_const_p(char, "data"),
		.get = py_netr_Credential_get_data,
		.set = py_netr_Credential_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_Credential_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_Credential *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Credential);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_Credential_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_Credential *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_Credential);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_Credential_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_Credential *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Credential, "netr_Credential", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Credential, "netr_Credential", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_Credential_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_Credential_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Credential_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Credential_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_Credential_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_Credential",
	.tp_getset = py_netr_Credential_getsetters,
	.tp_methods = py_netr_Credential_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_Credential_new,
};


static PyObject *py_netlogon_server_pipe_state_get_client_challenge(PyObject *obj, void *closure)
{
	struct netlogon_server_pipe_state *object = pytalloc_get_ptr(obj);
	PyObject *py_client_challenge;
	py_client_challenge = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->client_challenge);
	return py_client_challenge;
}

static int py_netlogon_server_pipe_state_set_client_challenge(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client_challenge");
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->client_challenge = *(struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netlogon_server_pipe_state_get_server_challenge(PyObject *obj, void *closure)
{
	struct netlogon_server_pipe_state *object = pytalloc_get_ptr(obj);
	PyObject *py_server_challenge;
	py_server_challenge = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->server_challenge);
	return py_server_challenge;
}

static int py_netlogon_server_pipe_state_set_server_challenge(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->server_challenge");
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->server_challenge = *(struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netlogon_server_pipe_state_getsetters[] = {
	{
		.name = discard_const_p(char, "client_challenge"),
		.get = py_netlogon_server_pipe_state_get_client_challenge,
		.set = py_netlogon_server_pipe_state_set_client_challenge,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "server_challenge"),
		.get = py_netlogon_server_pipe_state_get_server_challenge,
		.set = py_netlogon_server_pipe_state_set_server_challenge,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{ .name = NULL }
};

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

static PyObject *py_netlogon_server_pipe_state_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netlogon_server_pipe_state);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netlogon_server_pipe_state_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netlogon_server_pipe_state);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netlogon_server_pipe_state);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netlogon_server_pipe_state_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netlogon_server_pipe_state *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netlogon_server_pipe_state, "netlogon_server_pipe_state", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netlogon_server_pipe_state, "netlogon_server_pipe_state", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netlogon_server_pipe_state_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netlogon_server_pipe_state_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netlogon_server_pipe_state_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netlogon_server_pipe_state_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netlogon_server_pipe_state_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.server_pipe_state",
	.tp_getset = py_netlogon_server_pipe_state_getsetters,
	.tp_methods = py_netlogon_server_pipe_state_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netlogon_server_pipe_state_new,
};


static PyObject *py_netr_Authenticator_get_cred(PyObject *obj, void *closure)
{
	struct netr_Authenticator *object = pytalloc_get_ptr(obj);
	PyObject *py_cred;
	py_cred = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->cred);
	return py_cred;
}

static int py_netr_Authenticator_set_cred(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->cred");
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->cred = *(struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_Authenticator_get_timestamp(PyObject *obj, void *closure)
{
	struct netr_Authenticator *object = pytalloc_get_ptr(obj);
	PyObject *py_timestamp;
	py_timestamp = PyLong_FromLong(object->timestamp);
	return py_timestamp;
}

static int py_netr_Authenticator_set_timestamp(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timestamp");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->timestamp));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->timestamp = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_Authenticator_getsetters[] = {
	{
		.name = discard_const_p(char, "cred"),
		.get = py_netr_Authenticator_get_cred,
		.set = py_netr_Authenticator_set_cred,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "timestamp"),
		.get = py_netr_Authenticator_get_timestamp,
		.set = py_netr_Authenticator_set_timestamp,
		.doc = discard_const_p(char, "PIDL-generated element of base type time_t")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_Authenticator_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Authenticator);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_Authenticator_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_Authenticator);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_Authenticator_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_Authenticator *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Authenticator, "netr_Authenticator", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Authenticator, "netr_Authenticator", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_Authenticator_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_Authenticator_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Authenticator_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Authenticator_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_Authenticator_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_Authenticator",
	.tp_getset = py_netr_Authenticator_getsetters,
	.tp_methods = py_netr_Authenticator_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_Authenticator_new,
};


static PyObject *py_netr_DELTA_DELETE_USER_get_account_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		if (object->account_name == NULL) {
			py_account_name = Py_None;
			Py_INCREF(py_account_name);
		} else {
			py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
		}
	}
	return py_account_name;
}

static int py_netr_DELTA_DELETE_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
		return -1;
	}
	if (value == Py_None) {
		object->account_name = NULL;
	} else {
		object->account_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->account_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_DELTA_DELETE_USER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_DELETE_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_DELETE_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_DELETE_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_DELETE_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_DELETE_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_DELETE_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DELETE_USER_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_DELETE_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DELETE_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_DELETE_USER_getsetters[] = {
	{
		.name = discard_const_p(char, "account_name"),
		.get = py_netr_DELTA_DELETE_USER_get_account_name,
		.set = py_netr_DELTA_DELETE_USER_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown1,
		.set = py_netr_DELTA_DELETE_USER_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown2,
		.set = py_netr_DELTA_DELETE_USER_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown3,
		.set = py_netr_DELTA_DELETE_USER_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown4,
		.set = py_netr_DELTA_DELETE_USER_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown5,
		.set = py_netr_DELTA_DELETE_USER_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown6,
		.set = py_netr_DELTA_DELETE_USER_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown7,
		.set = py_netr_DELTA_DELETE_USER_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_DELETE_USER_get_unknown8,
		.set = py_netr_DELTA_DELETE_USER_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_DELETE_USER_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_DELETE_USER",
	.tp_getset = py_netr_DELTA_DELETE_USER_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_DELETE_USER_new,
};


static PyObject *py_netr_USER_KEY16_get_length(PyObject *obj, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromLong((uint16_t)(object->length));
	return py_length;
}

static int py_netr_USER_KEY16_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_USER_KEY16_get_size(PyObject *obj, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLong((uint16_t)(object->size));
	return py_size;
}

static int py_netr_USER_KEY16_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_USER_KEY16_get_flags(PyObject *obj, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_netr_USER_KEY16_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_USER_KEY16_get_pwd(PyObject *obj, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(obj);
	PyObject *py_pwd;
	py_pwd = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->pwd);
	return py_pwd;
}

static int py_netr_USER_KEY16_set_pwd(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEY16 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwd");
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->pwd = *(struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_USER_KEY16_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_USER_KEY16_get_length,
		.set = py_netr_USER_KEY16_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "size"),
		.get = py_netr_USER_KEY16_get_size,
		.set = py_netr_USER_KEY16_set_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "flags"),
		.get = py_netr_USER_KEY16_get_flags,
		.set = py_netr_USER_KEY16_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "pwd"),
		.get = py_netr_USER_KEY16_get_pwd,
		.set = py_netr_USER_KEY16_set_pwd,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_USER_KEY16_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_USER_KEY16",
	.tp_getset = py_netr_USER_KEY16_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_USER_KEY16_new,
};


static PyObject *py_netr_PasswordHistory_get_nt_length(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_nt_length;
	py_nt_length = PyLong_FromLong((uint16_t)(object->nt_length));
	return py_nt_length;
}

static int py_netr_PasswordHistory_set_nt_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->nt_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PasswordHistory_get_nt_size(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_nt_size;
	py_nt_size = PyLong_FromLong((uint16_t)(object->nt_size));
	return py_nt_size;
}

static int py_netr_PasswordHistory_set_nt_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->nt_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PasswordHistory_get_nt_flags(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_nt_flags;
	py_nt_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->nt_flags));
	return py_nt_flags;
}

static int py_netr_PasswordHistory_set_nt_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->nt_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PasswordHistory_get_lm_length(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_lm_length;
	py_lm_length = PyLong_FromLong((uint16_t)(object->lm_length));
	return py_lm_length;
}

static int py_netr_PasswordHistory_set_lm_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->lm_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PasswordHistory_get_lm_size(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_lm_size;
	py_lm_size = PyLong_FromLong((uint16_t)(object->lm_size));
	return py_lm_size;
}

static int py_netr_PasswordHistory_set_lm_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->lm_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PasswordHistory_get_lm_flags(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_lm_flags;
	py_lm_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->lm_flags));
	return py_lm_flags;
}

static int py_netr_PasswordHistory_set_lm_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->lm_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_PasswordHistory_get_nt_history(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_nt_history;
	py_nt_history = PyList_New(object->nt_length);
	if (py_nt_history == NULL) {
		return NULL;
	}
	{
		int nt_history_cntr_0;
		for (nt_history_cntr_0 = 0; nt_history_cntr_0 < (object->nt_length); nt_history_cntr_0++) {
			PyObject *py_nt_history_0;
			py_nt_history_0 = PyLong_FromLong((uint16_t)((object->nt_history)[nt_history_cntr_0]));
			PyList_SetItem(py_nt_history, nt_history_cntr_0, py_nt_history_0);
		}
	}
	return py_nt_history;
}

static int py_netr_PasswordHistory_set_nt_history(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_history");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int nt_history_cntr_0;
		object->nt_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->nt_history, PyList_GET_SIZE(value));
		if (!object->nt_history) { return -1; }
		talloc_set_name_const(object->nt_history, "ARRAY: object->nt_history");
		for (nt_history_cntr_0 = 0; nt_history_cntr_0 < PyList_GET_SIZE(value); nt_history_cntr_0++) {
			if (PyList_GET_ITEM(value, nt_history_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->nt_history)[nt_history_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->nt_history)[nt_history_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, nt_history_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, nt_history_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->nt_history)[nt_history_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_PasswordHistory_get_lm_history(PyObject *obj, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(obj);
	PyObject *py_lm_history;
	py_lm_history = PyList_New(object->lm_length);
	if (py_lm_history == NULL) {
		return NULL;
	}
	{
		int lm_history_cntr_0;
		for (lm_history_cntr_0 = 0; lm_history_cntr_0 < (object->lm_length); lm_history_cntr_0++) {
			PyObject *py_lm_history_0;
			py_lm_history_0 = PyLong_FromLong((uint16_t)((object->lm_history)[lm_history_cntr_0]));
			PyList_SetItem(py_lm_history, lm_history_cntr_0, py_lm_history_0);
		}
	}
	return py_lm_history;
}

static int py_netr_PasswordHistory_set_lm_history(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_PasswordHistory *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_history");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int lm_history_cntr_0;
		object->lm_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->lm_history, PyList_GET_SIZE(value));
		if (!object->lm_history) { return -1; }
		talloc_set_name_const(object->lm_history, "ARRAY: object->lm_history");
		for (lm_history_cntr_0 = 0; lm_history_cntr_0 < PyList_GET_SIZE(value); lm_history_cntr_0++) {
			if (PyList_GET_ITEM(value, lm_history_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->lm_history)[lm_history_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->lm_history)[lm_history_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, lm_history_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, lm_history_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->lm_history)[lm_history_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_PasswordHistory_getsetters[] = {
	{
		.name = discard_const_p(char, "nt_length"),
		.get = py_netr_PasswordHistory_get_nt_length,
		.set = py_netr_PasswordHistory_set_nt_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "nt_size"),
		.get = py_netr_PasswordHistory_get_nt_size,
		.set = py_netr_PasswordHistory_set_nt_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "nt_flags"),
		.get = py_netr_PasswordHistory_get_nt_flags,
		.set = py_netr_PasswordHistory_set_nt_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "lm_length"),
		.get = py_netr_PasswordHistory_get_lm_length,
		.set = py_netr_PasswordHistory_set_lm_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "lm_size"),
		.get = py_netr_PasswordHistory_get_lm_size,
		.set = py_netr_PasswordHistory_set_lm_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "lm_flags"),
		.get = py_netr_PasswordHistory_get_lm_flags,
		.set = py_netr_PasswordHistory_set_lm_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "nt_history"),
		.get = py_netr_PasswordHistory_get_nt_history,
		.set = py_netr_PasswordHistory_set_nt_history,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "lm_history"),
		.get = py_netr_PasswordHistory_get_lm_history,
		.set = py_netr_PasswordHistory_set_lm_history,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_PasswordHistory_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_PasswordHistory",
	.tp_getset = py_netr_PasswordHistory_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_PasswordHistory_new,
};


static PyObject *py_netr_USER_KEYS2_get_lmpassword(PyObject *obj, void *closure)
{
	struct netr_USER_KEYS2 *object = pytalloc_get_ptr(obj);
	PyObject *py_lmpassword;
	py_lmpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
	return py_lmpassword;
}

static int py_netr_USER_KEYS2_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEYS2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmpassword");
		return -1;
	}
	PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lmpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_USER_KEYS2_get_ntpassword(PyObject *obj, void *closure)
{
	struct netr_USER_KEYS2 *object = pytalloc_get_ptr(obj);
	PyObject *py_ntpassword;
	py_ntpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
	return py_ntpassword;
}

static int py_netr_USER_KEYS2_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEYS2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ntpassword");
		return -1;
	}
	PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->ntpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_USER_KEYS2_get_history(PyObject *obj, void *closure)
{
	struct netr_USER_KEYS2 *object = pytalloc_get_ptr(obj);
	PyObject *py_history;
	py_history = pytalloc_reference_ex(&netr_PasswordHistory_Type, pytalloc_get_mem_ctx(obj), &object->history);
	return py_history;
}

static int py_netr_USER_KEYS2_set_history(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEYS2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->history");
		return -1;
	}
	PY_CHECK_TYPE(&netr_PasswordHistory_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->history = *(struct netr_PasswordHistory *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_USER_KEYS2_getsetters[] = {
	{
		.name = discard_const_p(char, "lmpassword"),
		.get = py_netr_USER_KEYS2_get_lmpassword,
		.set = py_netr_USER_KEYS2_set_lmpassword,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
	},
	{
		.name = discard_const_p(char, "ntpassword"),
		.get = py_netr_USER_KEYS2_get_ntpassword,
		.set = py_netr_USER_KEYS2_set_ntpassword,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
	},
	{
		.name = discard_const_p(char, "history"),
		.get = py_netr_USER_KEYS2_get_history,
		.set = py_netr_USER_KEYS2_set_history,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_PasswordHistory")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_USER_KEYS2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_USER_KEYS2",
	.tp_getset = py_netr_USER_KEYS2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_USER_KEYS2_new,
};


static PyObject *py_netr_USER_KEY_UNION_get_keys2(PyObject *obj, void *closure)
{
	struct netr_USER_KEY_UNION *object = pytalloc_get_ptr(obj);
	PyObject *py_keys2;
	py_keys2 = pytalloc_reference_ex(&netr_USER_KEYS2_Type, pytalloc_get_mem_ctx(obj), &object->keys2);
	return py_keys2;
}

static int py_netr_USER_KEY_UNION_set_keys2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEY_UNION *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->keys2");
		return -1;
	}
	PY_CHECK_TYPE(&netr_USER_KEYS2_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->keys2 = *(struct netr_USER_KEYS2 *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_USER_KEY_UNION_getsetters[] = {
	{
		.name = discard_const_p(char, "keys2"),
		.get = py_netr_USER_KEY_UNION_get_keys2,
		.set = py_netr_USER_KEY_UNION_set_keys2,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEYS2")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_USER_KEY_UNION_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_USER_KEY_UNION",
	.tp_getset = py_netr_USER_KEY_UNION_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_USER_KEY_UNION_new,
};


static PyObject *py_netr_USER_KEYS_get_version(PyObject *obj, void *closure)
{
	struct netr_USER_KEYS *object = pytalloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
	return py_version;
}

static int py_netr_USER_KEYS_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->version");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->version = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_USER_KEYS_get_keys(PyObject *obj, void *closure)
{
	struct netr_USER_KEYS *object = pytalloc_get_ptr(obj);
	PyObject *py_keys;
	py_keys = pytalloc_reference_ex(&netr_USER_KEY_UNION_Type, pytalloc_get_mem_ctx(obj), &object->keys);
	return py_keys;
}

static int py_netr_USER_KEYS_set_keys(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->keys");
		return -1;
	}
	PY_CHECK_TYPE(&netr_USER_KEY_UNION_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->keys = *(struct netr_USER_KEY_UNION *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_USER_KEYS_getsetters[] = {
	{
		.name = discard_const_p(char, "version"),
		.get = py_netr_USER_KEYS_get_version,
		.set = py_netr_USER_KEYS_set_version,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "keys"),
		.get = py_netr_USER_KEYS_get_keys,
		.set = py_netr_USER_KEYS_set_keys,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY_UNION")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_USER_KEYS_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_USER_KEYS);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_USER_KEYS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_USER_KEYS);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_USER_KEYS_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_USER_KEYS *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_USER_KEYS, "netr_USER_KEYS", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_USER_KEYS, "netr_USER_KEYS", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_USER_KEYS_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_USER_KEYS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_USER_KEYS_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_USER_KEYS_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_USER_KEYS_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_USER_KEYS",
	.tp_getset = py_netr_USER_KEYS_getsetters,
	.tp_methods = py_netr_USER_KEYS_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_USER_KEYS_new,
};


static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag(PyObject *obj, void *closure)
{
	struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_SensitiveDataFlag;
	py_SensitiveDataFlag = PyLong_FromLong((uint16_t)(object->SensitiveDataFlag));
	return py_SensitiveDataFlag;
}

static int py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SensitiveDataFlag");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveDataFlag));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SensitiveDataFlag = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_USER_PRIVATE_INFO_get_DataLength(PyObject *obj, void *closure)
{
	struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_DataLength;
	py_DataLength = PyLong_FromUnsignedLongLong((uint32_t)(object->DataLength));
	return py_DataLength;
}

static int py_netr_USER_PRIVATE_INFO_set_DataLength(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->DataLength");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->DataLength));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->DataLength = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveData(PyObject *obj, void *closure)
{
	struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_SensitiveData;
	if (object->SensitiveData == NULL) {
		Py_RETURN_NONE;
	}
	if (object->SensitiveData == NULL) {
		py_SensitiveData = Py_None;
		Py_INCREF(py_SensitiveData);
	} else {
		py_SensitiveData = PyList_New(object->DataLength);
		if (py_SensitiveData == NULL) {
			return NULL;
		}
		{
			int SensitiveData_cntr_1;
			for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < (object->DataLength); SensitiveData_cntr_1++) {
				PyObject *py_SensitiveData_1;
				py_SensitiveData_1 = PyLong_FromLong((uint16_t)((object->SensitiveData)[SensitiveData_cntr_1]));
				PyList_SetItem(py_SensitiveData, SensitiveData_cntr_1, py_SensitiveData_1);
			}
		}
	}
	return py_SensitiveData;
}

static int py_netr_USER_PRIVATE_INFO_set_SensitiveData(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_USER_PRIVATE_INFO *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->SensitiveData));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SensitiveData");
		return -1;
	}
	if (value == Py_None) {
		object->SensitiveData = NULL;
	} else {
		object->SensitiveData = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int SensitiveData_cntr_1;
			object->SensitiveData = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->SensitiveData, PyList_GET_SIZE(value));
			if (!object->SensitiveData) { return -1; }
			talloc_set_name_const(object->SensitiveData, "ARRAY: object->SensitiveData");
			for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < PyList_GET_SIZE(value); SensitiveData_cntr_1++) {
				if (PyList_GET_ITEM(value, SensitiveData_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->SensitiveData)[SensitiveData_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->SensitiveData)[SensitiveData_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, SensitiveData_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, SensitiveData_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->SensitiveData)[SensitiveData_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_USER_PRIVATE_INFO_getsetters[] = {
	{
		.name = discard_const_p(char, "SensitiveDataFlag"),
		.get = py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag,
		.set = py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "DataLength"),
		.get = py_netr_USER_PRIVATE_INFO_get_DataLength,
		.set = py_netr_USER_PRIVATE_INFO_set_DataLength,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "SensitiveData"),
		.get = py_netr_USER_PRIVATE_INFO_get_SensitiveData,
		.set = py_netr_USER_PRIVATE_INFO_set_SensitiveData,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_USER_PRIVATE_INFO_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_USER_PRIVATE_INFO",
	.tp_getset = py_netr_USER_PRIVATE_INFO_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_USER_PRIVATE_INFO_new,
};


static PyObject *py_netr_DELTA_USER_get_account_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
	return py_account_name;
}

static int py_netr_DELTA_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_full_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_full_name;
	py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
	return py_full_name;
}

static int py_netr_DELTA_USER_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->full_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_rid(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
	return py_rid;
}

static int py_netr_DELTA_USER_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_primary_gid(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_primary_gid;
	py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)(object->primary_gid));
	return py_primary_gid;
}

static int py_netr_DELTA_USER_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_gid");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->primary_gid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_home_directory(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_home_directory;
	py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
	return py_home_directory;
}

static int py_netr_DELTA_USER_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_directory");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_home_drive(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_home_drive;
	py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
	return py_home_drive;
}

static int py_netr_DELTA_USER_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->home_drive");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_logon_script(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_script;
	py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
	return py_logon_script;
}

static int py_netr_DELTA_USER_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_script");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_description(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_description;
	py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_netr_DELTA_USER_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->description");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_workstations(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_workstations;
	py_workstations = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstations);
	return py_workstations;
}

static int py_netr_DELTA_USER_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstations");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->workstations = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_last_logon(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_last_logon;
	py_last_logon = PyLong_FromUnsignedLongLong(object->last_logon);
	return py_last_logon;
}

static int py_netr_DELTA_USER_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logon");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logon));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->last_logon = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_last_logoff(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_last_logoff;
	py_last_logoff = PyLong_FromUnsignedLongLong(object->last_logoff);
	return py_last_logoff;
}

static int py_netr_DELTA_USER_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_logoff");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logoff));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->last_logoff = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_logon_hours(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_hours;
	py_logon_hours = pytalloc_reference_ex(samr_LogonHours_Type, pytalloc_get_mem_ctx(obj), &object->logon_hours);
	return py_logon_hours;
}

static int py_netr_DELTA_USER_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_hours");
		return -1;
	}
	PY_CHECK_TYPE(samr_LogonHours_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->logon_hours = *(struct samr_LogonHours *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_bad_password_count(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_bad_password_count;
	py_bad_password_count = PyLong_FromLong((uint16_t)(object->bad_password_count));
	return py_bad_password_count;
}

static int py_netr_DELTA_USER_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->bad_password_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->bad_password_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_logon_count(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_count;
	py_logon_count = PyLong_FromLong((uint16_t)(object->logon_count));
	return py_logon_count;
}

static int py_netr_DELTA_USER_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_last_password_change(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_last_password_change;
	py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
	return py_last_password_change;
}

static int py_netr_DELTA_USER_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->last_password_change");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->last_password_change = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_acct_expiry(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_acct_expiry;
	py_acct_expiry = PyLong_FromUnsignedLongLong(object->acct_expiry);
	return py_acct_expiry;
}

static int py_netr_DELTA_USER_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acct_expiry");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_expiry));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->acct_expiry = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_acct_flags(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_acct_flags;
	py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->acct_flags));
	return py_acct_flags;
}

static int py_netr_DELTA_USER_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->acct_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->acct_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_lmpassword(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_lmpassword;
	py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
	return py_lmpassword;
}

static int py_netr_DELTA_USER_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lmpassword");
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_ntpassword(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_ntpassword;
	py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
	return py_ntpassword;
}

static int py_netr_DELTA_USER_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ntpassword");
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_nt_password_present(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_nt_password_present;
	py_nt_password_present = PyLong_FromLong((uint16_t)(object->nt_password_present));
	return py_nt_password_present;
}

static int py_netr_DELTA_USER_set_nt_password_present(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nt_password_present");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_password_present));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->nt_password_present = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_lm_password_present(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_lm_password_present;
	py_lm_password_present = PyLong_FromLong((uint16_t)(object->lm_password_present));
	return py_lm_password_present;
}

static int py_netr_DELTA_USER_set_lm_password_present(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lm_password_present");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_password_present));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->lm_password_present = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_password_expired(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_password_expired;
	py_password_expired = PyLong_FromLong((uint16_t)(object->password_expired));
	return py_password_expired;
}

static int py_netr_DELTA_USER_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password_expired");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_expired));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->password_expired = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_comment(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_comment;
	py_comment = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->comment);
	return py_comment;
}

static int py_netr_DELTA_USER_set_comment(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->comment");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->comment = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_parameters(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_parameters;
	py_parameters = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->parameters);
	return py_parameters;
}

static int py_netr_DELTA_USER_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parameters");
		return -1;
	}
	PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->parameters = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_country_code(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_country_code;
	py_country_code = PyLong_FromLong((uint16_t)(object->country_code));
	return py_country_code;
}

static int py_netr_DELTA_USER_set_country_code(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->country_code");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->country_code));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->country_code = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_code_page(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_code_page;
	py_code_page = PyLong_FromLong((uint16_t)(object->code_page));
	return py_code_page;
}

static int py_netr_DELTA_USER_set_code_page(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->code_page");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->code_page));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->code_page = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_user_private_info(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_user_private_info;
	py_user_private_info = pytalloc_reference_ex(&netr_USER_PRIVATE_INFO_Type, pytalloc_get_mem_ctx(obj), &object->user_private_info);
	return py_user_private_info;
}

static int py_netr_DELTA_USER_set_user_private_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->user_private_info");
		return -1;
	}
	PY_CHECK_TYPE(&netr_USER_PRIVATE_INFO_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->user_private_info = *(struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_USER_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_USER_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_profile_path(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_profile_path;
	py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
	return py_profile_path;
}

static int py_netr_DELTA_USER_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->profile_path");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_USER_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_USER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_USER_getsetters[] = {
	{
		.name = discard_const_p(char, "account_name"),
		.get = py_netr_DELTA_USER_get_account_name,
		.set = py_netr_DELTA_USER_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "full_name"),
		.get = py_netr_DELTA_USER_get_full_name,
		.set = py_netr_DELTA_USER_set_full_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "rid"),
		.get = py_netr_DELTA_USER_get_rid,
		.set = py_netr_DELTA_USER_set_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "primary_gid"),
		.get = py_netr_DELTA_USER_get_primary_gid,
		.set = py_netr_DELTA_USER_set_primary_gid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "home_directory"),
		.get = py_netr_DELTA_USER_get_home_directory,
		.set = py_netr_DELTA_USER_set_home_directory,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "home_drive"),
		.get = py_netr_DELTA_USER_get_home_drive,
		.set = py_netr_DELTA_USER_set_home_drive,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "logon_script"),
		.get = py_netr_DELTA_USER_get_logon_script,
		.set = py_netr_DELTA_USER_set_logon_script,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "description"),
		.get = py_netr_DELTA_USER_get_description,
		.set = py_netr_DELTA_USER_set_description,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "workstations"),
		.get = py_netr_DELTA_USER_get_workstations,
		.set = py_netr_DELTA_USER_set_workstations,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "last_logon"),
		.get = py_netr_DELTA_USER_get_last_logon,
		.set = py_netr_DELTA_USER_set_last_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "last_logoff"),
		.get = py_netr_DELTA_USER_get_last_logoff,
		.set = py_netr_DELTA_USER_set_last_logoff,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "logon_hours"),
		.get = py_netr_DELTA_USER_get_logon_hours,
		.set = py_netr_DELTA_USER_set_logon_hours,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_LogonHours")
	},
	{
		.name = discard_const_p(char, "bad_password_count"),
		.get = py_netr_DELTA_USER_get_bad_password_count,
		.set = py_netr_DELTA_USER_set_bad_password_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "logon_count"),
		.get = py_netr_DELTA_USER_get_logon_count,
		.set = py_netr_DELTA_USER_set_logon_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "last_password_change"),
		.get = py_netr_DELTA_USER_get_last_password_change,
		.set = py_netr_DELTA_USER_set_last_password_change,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "acct_expiry"),
		.get = py_netr_DELTA_USER_get_acct_expiry,
		.set = py_netr_DELTA_USER_set_acct_expiry,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "acct_flags"),
		.get = py_netr_DELTA_USER_get_acct_flags,
		.set = py_netr_DELTA_USER_set_acct_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
	},
	{
		.name = discard_const_p(char, "lmpassword"),
		.get = py_netr_DELTA_USER_get_lmpassword,
		.set = py_netr_DELTA_USER_set_lmpassword,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "ntpassword"),
		.get = py_netr_DELTA_USER_get_ntpassword,
		.set = py_netr_DELTA_USER_set_ntpassword,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "nt_password_present"),
		.get = py_netr_DELTA_USER_get_nt_password_present,
		.set = py_netr_DELTA_USER_set_nt_password_present,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "lm_password_present"),
		.get = py_netr_DELTA_USER_get_lm_password_present,
		.set = py_netr_DELTA_USER_set_lm_password_present,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "password_expired"),
		.get = py_netr_DELTA_USER_get_password_expired,
		.set = py_netr_DELTA_USER_set_password_expired,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "comment"),
		.get = py_netr_DELTA_USER_get_comment,
		.set = py_netr_DELTA_USER_set_comment,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "parameters"),
		.get = py_netr_DELTA_USER_get_parameters,
		.set = py_netr_DELTA_USER_set_parameters,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
	},
	{
		.name = discard_const_p(char, "country_code"),
		.get = py_netr_DELTA_USER_get_country_code,
		.set = py_netr_DELTA_USER_set_country_code,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "code_page"),
		.get = py_netr_DELTA_USER_get_code_page,
		.set = py_netr_DELTA_USER_set_code_page,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "user_private_info"),
		.get = py_netr_DELTA_USER_get_user_private_info,
		.set = py_netr_DELTA_USER_set_user_private_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_PRIVATE_INFO")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_USER_get_SecurityInformation,
		.set = py_netr_DELTA_USER_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_USER_get_sdbuf,
		.set = py_netr_DELTA_USER_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "profile_path"),
		.get = py_netr_DELTA_USER_get_profile_path,
		.set = py_netr_DELTA_USER_set_profile_path,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_USER_get_unknown2,
		.set = py_netr_DELTA_USER_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_USER_get_unknown3,
		.set = py_netr_DELTA_USER_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_USER_get_unknown4,
		.set = py_netr_DELTA_USER_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_USER_get_unknown5,
		.set = py_netr_DELTA_USER_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_USER_get_unknown6,
		.set = py_netr_DELTA_USER_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_USER_get_unknown7,
		.set = py_netr_DELTA_USER_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_USER_get_unknown8,
		.set = py_netr_DELTA_USER_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_USER_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_USER",
	.tp_getset = py_netr_DELTA_USER_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_USER_new,
};


static PyObject *py_netr_DELTA_DOMAIN_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
	return py_domain_name;
}

static int py_netr_DELTA_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_oem_information(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_oem_information;
	py_oem_information = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->oem_information);
	return py_oem_information;
}

static int py_netr_DELTA_DOMAIN_set_oem_information(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->oem_information");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->oem_information = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_force_logoff_time(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_force_logoff_time;
	py_force_logoff_time = PyLong_FromLongLong(object->force_logoff_time);
	return py_force_logoff_time;
}

static int py_netr_DELTA_DOMAIN_set_force_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->force_logoff_time");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->force_logoff_time));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->force_logoff_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_min_password_length(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_min_password_length;
	py_min_password_length = PyLong_FromLong((uint16_t)(object->min_password_length));
	return py_min_password_length;
}

static int py_netr_DELTA_DOMAIN_set_min_password_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->min_password_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->min_password_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->min_password_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_password_history_length(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_password_history_length;
	py_password_history_length = PyLong_FromLong((uint16_t)(object->password_history_length));
	return py_password_history_length;
}

static int py_netr_DELTA_DOMAIN_set_password_history_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->password_history_length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_history_length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->password_history_length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_max_password_age(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_max_password_age;
	py_max_password_age = PyLong_FromLongLong(object->max_password_age);
	return py_max_password_age;
}

static int py_netr_DELTA_DOMAIN_set_max_password_age(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->max_password_age");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->max_password_age));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->max_password_age = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_min_password_age(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_min_password_age;
	py_min_password_age = PyLong_FromLongLong(object->min_password_age);
	return py_min_password_age;
}

static int py_netr_DELTA_DOMAIN_set_min_password_age(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->min_password_age");
		return -1;
	}
	{
		const long long int_max = ndr_sizeof2intmax(sizeof(object->min_password_age));
		const long long int_min = -int_max - 1;
		if (PyLong_Check(value)) {
			long long test_var;
			test_var = PyLong_AsLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var < int_min || test_var > int_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
				  PyLong_Type.tp_name, int_min, int_max, test_var);
				return -1;
			}
			object->min_password_age = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_sequence_num(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_sequence_num;
	py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
	return py_sequence_num;
}

static int py_netr_DELTA_DOMAIN_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sequence_num");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->sequence_num = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_domain_create_time(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_create_time;
	py_domain_create_time = PyLong_FromUnsignedLongLong(object->domain_create_time);
	return py_domain_create_time;
}

static int py_netr_DELTA_DOMAIN_set_domain_create_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_create_time");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->domain_create_time));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->domain_create_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_account_lockout(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_account_lockout;
	py_account_lockout = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->account_lockout);
	return py_account_lockout;
}

static int py_netr_DELTA_DOMAIN_set_account_lockout(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->account_lockout");
		return -1;
	}
	PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->account_lockout = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_logon_to_chgpass(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_to_chgpass;
	py_logon_to_chgpass = PyLong_FromUnsignedLongLong((uint32_t)(object->logon_to_chgpass));
	return py_logon_to_chgpass;
}

static int py_netr_DELTA_DOMAIN_set_logon_to_chgpass(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_to_chgpass");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_to_chgpass));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_to_chgpass = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_DOMAIN_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_DOMAIN_getsetters[] = {
	{
		.name = discard_const_p(char, "domain_name"),
		.get = py_netr_DELTA_DOMAIN_get_domain_name,
		.set = py_netr_DELTA_DOMAIN_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "oem_information"),
		.get = py_netr_DELTA_DOMAIN_get_oem_information,
		.set = py_netr_DELTA_DOMAIN_set_oem_information,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "force_logoff_time"),
		.get = py_netr_DELTA_DOMAIN_get_force_logoff_time,
		.set = py_netr_DELTA_DOMAIN_set_force_logoff_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type dlong")
	},
	{
		.name = discard_const_p(char, "min_password_length"),
		.get = py_netr_DELTA_DOMAIN_get_min_password_length,
		.set = py_netr_DELTA_DOMAIN_set_min_password_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "password_history_length"),
		.get = py_netr_DELTA_DOMAIN_get_password_history_length,
		.set = py_netr_DELTA_DOMAIN_set_password_history_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "max_password_age"),
		.get = py_netr_DELTA_DOMAIN_get_max_password_age,
		.set = py_netr_DELTA_DOMAIN_set_max_password_age,
		.doc = discard_const_p(char, "PIDL-generated element of base type dlong")
	},
	{
		.name = discard_const_p(char, "min_password_age"),
		.get = py_netr_DELTA_DOMAIN_get_min_password_age,
		.set = py_netr_DELTA_DOMAIN_set_min_password_age,
		.doc = discard_const_p(char, "PIDL-generated element of base type dlong")
	},
	{
		.name = discard_const_p(char, "sequence_num"),
		.get = py_netr_DELTA_DOMAIN_get_sequence_num,
		.set = py_netr_DELTA_DOMAIN_set_sequence_num,
		.doc = discard_const_p(char, "PIDL-generated element of base type udlong")
	},
	{
		.name = discard_const_p(char, "domain_create_time"),
		.get = py_netr_DELTA_DOMAIN_get_domain_create_time,
		.set = py_netr_DELTA_DOMAIN_set_domain_create_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_DOMAIN_get_SecurityInformation,
		.set = py_netr_DELTA_DOMAIN_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_DOMAIN_get_sdbuf,
		.set = py_netr_DELTA_DOMAIN_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "account_lockout"),
		.get = py_netr_DELTA_DOMAIN_get_account_lockout,
		.set = py_netr_DELTA_DOMAIN_set_account_lockout,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_DOMAIN_get_unknown2,
		.set = py_netr_DELTA_DOMAIN_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_DOMAIN_get_unknown3,
		.set = py_netr_DELTA_DOMAIN_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_DOMAIN_get_unknown4,
		.set = py_netr_DELTA_DOMAIN_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "logon_to_chgpass"),
		.get = py_netr_DELTA_DOMAIN_get_logon_to_chgpass,
		.set = py_netr_DELTA_DOMAIN_set_logon_to_chgpass,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_DOMAIN_get_unknown6,
		.set = py_netr_DELTA_DOMAIN_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_DOMAIN_get_unknown7,
		.set = py_netr_DELTA_DOMAIN_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_DOMAIN_get_unknown8,
		.set = py_netr_DELTA_DOMAIN_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_DOMAIN_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_DOMAIN",
	.tp_getset = py_netr_DELTA_DOMAIN_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_DOMAIN_new,
};


static PyObject *py_netr_DELTA_GROUP_get_group_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_group_name;
	py_group_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->group_name);
	return py_group_name;
}

static int py_netr_DELTA_GROUP_set_group_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->group_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->group_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_rid(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
	return py_rid;
}

static int py_netr_DELTA_GROUP_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_attributes(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_attributes;
	py_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->attributes));
	return py_attributes;
}

static int py_netr_DELTA_GROUP_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->attributes");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->attributes = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_description(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_description;
	py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_netr_DELTA_GROUP_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->description");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_GROUP_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_GROUP_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_DELTA_GROUP_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_GROUP_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_GROUP_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_GROUP_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_GROUP_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_GROUP_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_GROUP_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_GROUP_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_GROUP_getsetters[] = {
	{
		.name = discard_const_p(char, "group_name"),
		.get = py_netr_DELTA_GROUP_get_group_name,
		.set = py_netr_DELTA_GROUP_set_group_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "rid"),
		.get = py_netr_DELTA_GROUP_get_rid,
		.set = py_netr_DELTA_GROUP_set_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "attributes"),
		.get = py_netr_DELTA_GROUP_get_attributes,
		.set = py_netr_DELTA_GROUP_set_attributes,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "description"),
		.get = py_netr_DELTA_GROUP_get_description,
		.set = py_netr_DELTA_GROUP_set_description,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_GROUP_get_SecurityInformation,
		.set = py_netr_DELTA_GROUP_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_GROUP_get_sdbuf,
		.set = py_netr_DELTA_GROUP_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_GROUP_get_unknown1,
		.set = py_netr_DELTA_GROUP_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_GROUP_get_unknown2,
		.set = py_netr_DELTA_GROUP_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_GROUP_get_unknown3,
		.set = py_netr_DELTA_GROUP_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_GROUP_get_unknown4,
		.set = py_netr_DELTA_GROUP_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_GROUP_get_unknown5,
		.set = py_netr_DELTA_GROUP_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_GROUP_get_unknown6,
		.set = py_netr_DELTA_GROUP_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_GROUP_get_unknown7,
		.set = py_netr_DELTA_GROUP_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_GROUP_get_unknown8,
		.set = py_netr_DELTA_GROUP_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_GROUP_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_GROUP",
	.tp_getset = py_netr_DELTA_GROUP_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_GROUP_new,
};


static PyObject *py_netr_DELTA_RENAME_get_OldName(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_OldName;
	py_OldName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->OldName);
	return py_OldName;
}

static int py_netr_DELTA_RENAME_set_OldName(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->OldName");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->OldName = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_NewName(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_NewName;
	py_NewName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->NewName);
	return py_NewName;
}

static int py_netr_DELTA_RENAME_set_NewName(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->NewName");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->NewName = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_DELTA_RENAME_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_RENAME_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_RENAME_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_RENAME_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_RENAME_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_RENAME_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_RENAME_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_RENAME_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_RENAME_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_RENAME *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_RENAME_getsetters[] = {
	{
		.name = discard_const_p(char, "OldName"),
		.get = py_netr_DELTA_RENAME_get_OldName,
		.set = py_netr_DELTA_RENAME_set_OldName,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "NewName"),
		.get = py_netr_DELTA_RENAME_get_NewName,
		.set = py_netr_DELTA_RENAME_set_NewName,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_RENAME_get_unknown1,
		.set = py_netr_DELTA_RENAME_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_RENAME_get_unknown2,
		.set = py_netr_DELTA_RENAME_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_RENAME_get_unknown3,
		.set = py_netr_DELTA_RENAME_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_RENAME_get_unknown4,
		.set = py_netr_DELTA_RENAME_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_RENAME_get_unknown5,
		.set = py_netr_DELTA_RENAME_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_RENAME_get_unknown6,
		.set = py_netr_DELTA_RENAME_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_RENAME_get_unknown7,
		.set = py_netr_DELTA_RENAME_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_RENAME_get_unknown8,
		.set = py_netr_DELTA_RENAME_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_RENAME_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_RENAME",
	.tp_getset = py_netr_DELTA_RENAME_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_RENAME_new,
};


static PyObject *py_netr_DELTA_GROUP_MEMBER_get_rids(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_rids;
	if (object->rids == NULL) {
		Py_RETURN_NONE;
	}
	if (object->rids == NULL) {
		py_rids = Py_None;
		Py_INCREF(py_rids);
	} else {
		py_rids = PyList_New(object->num_rids);
		if (py_rids == NULL) {
			return NULL;
		}
		{
			int rids_cntr_1;
			for (rids_cntr_1 = 0; rids_cntr_1 < (object->num_rids); rids_cntr_1++) {
				PyObject *py_rids_1;
				py_rids_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->rids)[rids_cntr_1]));
				PyList_SetItem(py_rids, rids_cntr_1, py_rids_1);
			}
		}
	}
	return py_rids;
}

static int py_netr_DELTA_GROUP_MEMBER_set_rids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->rids));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rids");
		return -1;
	}
	if (value == Py_None) {
		object->rids = NULL;
	} else {
		object->rids = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int rids_cntr_1;
			object->rids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
			if (!object->rids) { return -1; }
			talloc_set_name_const(object->rids, "ARRAY: object->rids");
			for (rids_cntr_1 = 0; rids_cntr_1 < PyList_GET_SIZE(value); rids_cntr_1++) {
				if (PyList_GET_ITEM(value, rids_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->rids)[rids_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->rids)[rids_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, rids_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, rids_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->rids)[rids_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_MEMBER_get_attribs(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_attribs;
	if (object->attribs == NULL) {
		Py_RETURN_NONE;
	}
	if (object->attribs == NULL) {
		py_attribs = Py_None;
		Py_INCREF(py_attribs);
	} else {
		py_attribs = PyList_New(object->num_rids);
		if (py_attribs == NULL) {
			return NULL;
		}
		{
			int attribs_cntr_1;
			for (attribs_cntr_1 = 0; attribs_cntr_1 < (object->num_rids); attribs_cntr_1++) {
				PyObject *py_attribs_1;
				py_attribs_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->attribs)[attribs_cntr_1]));
				PyList_SetItem(py_attribs, attribs_cntr_1, py_attribs_1);
			}
		}
	}
	return py_attribs;
}

static int py_netr_DELTA_GROUP_MEMBER_set_attribs(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->attribs));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->attribs");
		return -1;
	}
	if (value == Py_None) {
		object->attribs = NULL;
	} else {
		object->attribs = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int attribs_cntr_1;
			object->attribs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attribs, PyList_GET_SIZE(value));
			if (!object->attribs) { return -1; }
			talloc_set_name_const(object->attribs, "ARRAY: object->attribs");
			for (attribs_cntr_1 = 0; attribs_cntr_1 < PyList_GET_SIZE(value); attribs_cntr_1++) {
				if (PyList_GET_ITEM(value, attribs_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->attribs)[attribs_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->attribs)[attribs_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, attribs_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, attribs_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->attribs)[attribs_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_MEMBER_get_num_rids(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_num_rids;
	py_num_rids = PyLong_FromUnsignedLongLong((uint32_t)(object->num_rids));
	return py_num_rids;
}

static int py_netr_DELTA_GROUP_MEMBER_set_num_rids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_rids");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_rids));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_rids = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
	return py_unknown1;
}

static int py_netr_DELTA_GROUP_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
	return py_unknown2;
}

static int py_netr_DELTA_GROUP_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown2 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown3));
	return py_unknown3;
}

static int py_netr_DELTA_GROUP_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown3 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown4));
	return py_unknown4;
}

static int py_netr_DELTA_GROUP_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_GROUP_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown4 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_GROUP_MEMBER_getsetters[] = {
	{
		.name = discard_const_p(char, "rids"),
		.get = py_netr_DELTA_GROUP_MEMBER_get_rids,
		.set = py_netr_DELTA_GROUP_MEMBER_set_rids,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "attribs"),
		.get = py_netr_DELTA_GROUP_MEMBER_get_attribs,
		.set = py_netr_DELTA_GROUP_MEMBER_set_attribs,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "num_rids"),
		.get = py_netr_DELTA_GROUP_MEMBER_get_num_rids,
		.set = py_netr_DELTA_GROUP_MEMBER_set_num_rids,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_GROUP_MEMBER_get_unknown1,
		.set = py_netr_DELTA_GROUP_MEMBER_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_GROUP_MEMBER_get_unknown2,
		.set = py_netr_DELTA_GROUP_MEMBER_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_GROUP_MEMBER_get_unknown3,
		.set = py_netr_DELTA_GROUP_MEMBER_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_GROUP_MEMBER_get_unknown4,
		.set = py_netr_DELTA_GROUP_MEMBER_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_GROUP_MEMBER_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_GROUP_MEMBER",
	.tp_getset = py_netr_DELTA_GROUP_MEMBER_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_GROUP_MEMBER_new,
};


static PyObject *py_netr_DELTA_ALIAS_get_alias_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_alias_name;
	py_alias_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->alias_name);
	return py_alias_name;
}

static int py_netr_DELTA_ALIAS_set_alias_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->alias_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->alias_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_rid(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_rid;
	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->rid));
	return py_rid;
}

static int py_netr_DELTA_ALIAS_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rid");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_ALIAS_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_ALIAS_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_description(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_description;
	py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
	return py_description;
}

static int py_netr_DELTA_ALIAS_set_description(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->description");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_ALIAS_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_ALIAS_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_ALIAS_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_ALIAS_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_ALIAS_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_ALIAS_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_ALIAS_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_ALIAS_getsetters[] = {
	{
		.name = discard_const_p(char, "alias_name"),
		.get = py_netr_DELTA_ALIAS_get_alias_name,
		.set = py_netr_DELTA_ALIAS_set_alias_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "rid"),
		.get = py_netr_DELTA_ALIAS_get_rid,
		.set = py_netr_DELTA_ALIAS_set_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_ALIAS_get_SecurityInformation,
		.set = py_netr_DELTA_ALIAS_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_ALIAS_get_sdbuf,
		.set = py_netr_DELTA_ALIAS_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "description"),
		.get = py_netr_DELTA_ALIAS_get_description,
		.set = py_netr_DELTA_ALIAS_set_description,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_ALIAS_get_unknown2,
		.set = py_netr_DELTA_ALIAS_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_ALIAS_get_unknown3,
		.set = py_netr_DELTA_ALIAS_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_ALIAS_get_unknown4,
		.set = py_netr_DELTA_ALIAS_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_ALIAS_get_unknown5,
		.set = py_netr_DELTA_ALIAS_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_ALIAS_get_unknown6,
		.set = py_netr_DELTA_ALIAS_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_ALIAS_get_unknown7,
		.set = py_netr_DELTA_ALIAS_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_ALIAS_get_unknown8,
		.set = py_netr_DELTA_ALIAS_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_ALIAS_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_ALIAS",
	.tp_getset = py_netr_DELTA_ALIAS_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_ALIAS_new,
};


static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_sids(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_sids;
	py_sids = pytalloc_reference_ex(lsa_SidArray_Type, pytalloc_get_mem_ctx(obj), &object->sids);
	return py_sids;
}

static int py_netr_DELTA_ALIAS_MEMBER_set_sids(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sids");
		return -1;
	}
	PY_CHECK_TYPE(lsa_SidArray_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sids = *(struct lsa_SidArray *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
	return py_unknown1;
}

static int py_netr_DELTA_ALIAS_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
	return py_unknown2;
}

static int py_netr_DELTA_ALIAS_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown2 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown3));
	return py_unknown3;
}

static int py_netr_DELTA_ALIAS_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown3 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown4));
	return py_unknown4;
}

static int py_netr_DELTA_ALIAS_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ALIAS_MEMBER *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown4 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_ALIAS_MEMBER_getsetters[] = {
	{
		.name = discard_const_p(char, "sids"),
		.get = py_netr_DELTA_ALIAS_MEMBER_get_sids,
		.set = py_netr_DELTA_ALIAS_MEMBER_set_sids,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidArray")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_ALIAS_MEMBER_get_unknown1,
		.set = py_netr_DELTA_ALIAS_MEMBER_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_ALIAS_MEMBER_get_unknown2,
		.set = py_netr_DELTA_ALIAS_MEMBER_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_ALIAS_MEMBER_get_unknown3,
		.set = py_netr_DELTA_ALIAS_MEMBER_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_ALIAS_MEMBER_get_unknown4,
		.set = py_netr_DELTA_ALIAS_MEMBER_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_ALIAS_MEMBER",
	.tp_getset = py_netr_DELTA_ALIAS_MEMBER_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_ALIAS_MEMBER_new,
};


static PyObject *py_netr_QUOTA_LIMITS_get_pagedpoollimit(PyObject *obj, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
	PyObject *py_pagedpoollimit;
	py_pagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)(object->pagedpoollimit));
	return py_pagedpoollimit;
}

static int py_netr_QUOTA_LIMITS_set_pagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pagedpoollimit");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagedpoollimit));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->pagedpoollimit = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_QUOTA_LIMITS_get_nonpagedpoollimit(PyObject *obj, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
	PyObject *py_nonpagedpoollimit;
	py_nonpagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)(object->nonpagedpoollimit));
	return py_nonpagedpoollimit;
}

static int py_netr_QUOTA_LIMITS_set_nonpagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nonpagedpoollimit");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nonpagedpoollimit));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->nonpagedpoollimit = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_QUOTA_LIMITS_get_minimumworkingsetsize(PyObject *obj, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
	PyObject *py_minimumworkingsetsize;
	py_minimumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)(object->minimumworkingsetsize));
	return py_minimumworkingsetsize;
}

static int py_netr_QUOTA_LIMITS_set_minimumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->minimumworkingsetsize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minimumworkingsetsize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->minimumworkingsetsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_QUOTA_LIMITS_get_maximumworkingsetsize(PyObject *obj, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
	PyObject *py_maximumworkingsetsize;
	py_maximumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)(object->maximumworkingsetsize));
	return py_maximumworkingsetsize;
}

static int py_netr_QUOTA_LIMITS_set_maximumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maximumworkingsetsize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maximumworkingsetsize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->maximumworkingsetsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_QUOTA_LIMITS_get_pagefilelimit(PyObject *obj, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
	PyObject *py_pagefilelimit;
	py_pagefilelimit = PyLong_FromUnsignedLongLong((uint32_t)(object->pagefilelimit));
	return py_pagefilelimit;
}

static int py_netr_QUOTA_LIMITS_set_pagefilelimit(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pagefilelimit");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagefilelimit));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->pagefilelimit = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_QUOTA_LIMITS_get_timelimit(PyObject *obj, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(obj);
	PyObject *py_timelimit;
	py_timelimit = PyLong_FromUnsignedLongLong(object->timelimit);
	return py_timelimit;
}

static int py_netr_QUOTA_LIMITS_set_timelimit(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_QUOTA_LIMITS *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timelimit");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timelimit));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->timelimit = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_QUOTA_LIMITS_getsetters[] = {
	{
		.name = discard_const_p(char, "pagedpoollimit"),
		.get = py_netr_QUOTA_LIMITS_get_pagedpoollimit,
		.set = py_netr_QUOTA_LIMITS_set_pagedpoollimit,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "nonpagedpoollimit"),
		.get = py_netr_QUOTA_LIMITS_get_nonpagedpoollimit,
		.set = py_netr_QUOTA_LIMITS_set_nonpagedpoollimit,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "minimumworkingsetsize"),
		.get = py_netr_QUOTA_LIMITS_get_minimumworkingsetsize,
		.set = py_netr_QUOTA_LIMITS_set_minimumworkingsetsize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "maximumworkingsetsize"),
		.get = py_netr_QUOTA_LIMITS_get_maximumworkingsetsize,
		.set = py_netr_QUOTA_LIMITS_set_maximumworkingsetsize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "pagefilelimit"),
		.get = py_netr_QUOTA_LIMITS_get_pagefilelimit,
		.set = py_netr_QUOTA_LIMITS_set_pagefilelimit,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "timelimit"),
		.get = py_netr_QUOTA_LIMITS_get_timelimit,
		.set = py_netr_QUOTA_LIMITS_set_timelimit,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_QUOTA_LIMITS_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_QUOTA_LIMITS",
	.tp_getset = py_netr_QUOTA_LIMITS_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_QUOTA_LIMITS_new,
};


static PyObject *py_netr_DELTA_POLICY_get_maxlogsize(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_maxlogsize;
	py_maxlogsize = PyLong_FromUnsignedLongLong((uint32_t)(object->maxlogsize));
	return py_maxlogsize;
}

static int py_netr_DELTA_POLICY_set_maxlogsize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxlogsize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlogsize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->maxlogsize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_auditretentionperiod(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_auditretentionperiod;
	py_auditretentionperiod = PyLong_FromUnsignedLongLong(object->auditretentionperiod);
	return py_auditretentionperiod;
}

static int py_netr_DELTA_POLICY_set_auditretentionperiod(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auditretentionperiod");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditretentionperiod));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->auditretentionperiod = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_auditingmode(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_auditingmode;
	py_auditingmode = PyLong_FromLong((uint16_t)(object->auditingmode));
	return py_auditingmode;
}

static int py_netr_DELTA_POLICY_set_auditingmode(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->auditingmode");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditingmode));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->auditingmode = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_maxauditeventcount(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_maxauditeventcount;
	py_maxauditeventcount = PyLong_FromUnsignedLongLong((uint32_t)(object->maxauditeventcount));
	return py_maxauditeventcount;
}

static int py_netr_DELTA_POLICY_set_maxauditeventcount(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxauditeventcount");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxauditeventcount));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->maxauditeventcount = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_eventauditoptions(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_eventauditoptions;
	if (object->eventauditoptions == NULL) {
		Py_RETURN_NONE;
	}
	if (object->eventauditoptions == NULL) {
		py_eventauditoptions = Py_None;
		Py_INCREF(py_eventauditoptions);
	} else {
		py_eventauditoptions = PyList_New(object->maxauditeventcount + 1);
		if (py_eventauditoptions == NULL) {
			return NULL;
		}
		{
			int eventauditoptions_cntr_1;
			for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < (object->maxauditeventcount + 1); eventauditoptions_cntr_1++) {
				PyObject *py_eventauditoptions_1;
				py_eventauditoptions_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->eventauditoptions)[eventauditoptions_cntr_1]));
				PyList_SetItem(py_eventauditoptions, eventauditoptions_cntr_1, py_eventauditoptions_1);
			}
		}
	}
	return py_eventauditoptions;
}

static int py_netr_DELTA_POLICY_set_eventauditoptions(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->eventauditoptions));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->eventauditoptions");
		return -1;
	}
	if (value == Py_None) {
		object->eventauditoptions = NULL;
	} else {
		object->eventauditoptions = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int eventauditoptions_cntr_1;
			object->eventauditoptions = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->eventauditoptions, PyList_GET_SIZE(value));
			if (!object->eventauditoptions) { return -1; }
			talloc_set_name_const(object->eventauditoptions, "ARRAY: object->eventauditoptions");
			for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < PyList_GET_SIZE(value); eventauditoptions_cntr_1++) {
				if (PyList_GET_ITEM(value, eventauditoptions_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->eventauditoptions)[eventauditoptions_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->eventauditoptions)[eventauditoptions_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, eventauditoptions_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, eventauditoptions_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->eventauditoptions)[eventauditoptions_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_primary_domain_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_primary_domain_name;
	py_primary_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain_name);
	return py_primary_domain_name;
}

static int py_netr_DELTA_POLICY_set_primary_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_domain_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->primary_domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_sid(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_sid;
	if (object->sid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sid == NULL) {
		py_sid = Py_None;
		Py_INCREF(py_sid);
	} else {
		py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
	}
	return py_sid;
}

static int py_netr_DELTA_POLICY_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sid");
		return -1;
	}
	if (value == Py_None) {
		object->sid = NULL;
	} else {
		object->sid = NULL;
		PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_quota_limits(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_quota_limits;
	py_quota_limits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quota_limits);
	return py_quota_limits;
}

static int py_netr_DELTA_POLICY_set_quota_limits(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->quota_limits");
		return -1;
	}
	PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->quota_limits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_sequence_num(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_sequence_num;
	py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
	return py_sequence_num;
}

static int py_netr_DELTA_POLICY_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sequence_num");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->sequence_num = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_db_create_time(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_db_create_time;
	py_db_create_time = PyLong_FromUnsignedLongLong(object->db_create_time);
	return py_db_create_time;
}

static int py_netr_DELTA_POLICY_set_db_create_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->db_create_time");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_create_time));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->db_create_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_POLICY_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_POLICY_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_DELTA_POLICY_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_POLICY_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_POLICY_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_POLICY_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_POLICY_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_POLICY_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_POLICY_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_POLICY_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_POLICY_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_POLICY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_POLICY_getsetters[] = {
	{
		.name = discard_const_p(char, "maxlogsize"),
		.get = py_netr_DELTA_POLICY_get_maxlogsize,
		.set = py_netr_DELTA_POLICY_set_maxlogsize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "auditretentionperiod"),
		.get = py_netr_DELTA_POLICY_get_auditretentionperiod,
		.set = py_netr_DELTA_POLICY_set_auditretentionperiod,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "auditingmode"),
		.get = py_netr_DELTA_POLICY_get_auditingmode,
		.set = py_netr_DELTA_POLICY_set_auditingmode,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "maxauditeventcount"),
		.get = py_netr_DELTA_POLICY_get_maxauditeventcount,
		.set = py_netr_DELTA_POLICY_set_maxauditeventcount,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "eventauditoptions"),
		.get = py_netr_DELTA_POLICY_get_eventauditoptions,
		.set = py_netr_DELTA_POLICY_set_eventauditoptions,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "primary_domain_name"),
		.get = py_netr_DELTA_POLICY_get_primary_domain_name,
		.set = py_netr_DELTA_POLICY_set_primary_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "sid"),
		.get = py_netr_DELTA_POLICY_get_sid,
		.set = py_netr_DELTA_POLICY_set_sid,
		.doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
	},
	{
		.name = discard_const_p(char, "quota_limits"),
		.get = py_netr_DELTA_POLICY_get_quota_limits,
		.set = py_netr_DELTA_POLICY_set_quota_limits,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
	},
	{
		.name = discard_const_p(char, "sequence_num"),
		.get = py_netr_DELTA_POLICY_get_sequence_num,
		.set = py_netr_DELTA_POLICY_set_sequence_num,
		.doc = discard_const_p(char, "PIDL-generated element of base type udlong")
	},
	{
		.name = discard_const_p(char, "db_create_time"),
		.get = py_netr_DELTA_POLICY_get_db_create_time,
		.set = py_netr_DELTA_POLICY_set_db_create_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_POLICY_get_SecurityInformation,
		.set = py_netr_DELTA_POLICY_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_POLICY_get_sdbuf,
		.set = py_netr_DELTA_POLICY_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_POLICY_get_unknown1,
		.set = py_netr_DELTA_POLICY_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_POLICY_get_unknown2,
		.set = py_netr_DELTA_POLICY_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_POLICY_get_unknown3,
		.set = py_netr_DELTA_POLICY_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_POLICY_get_unknown4,
		.set = py_netr_DELTA_POLICY_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_POLICY_get_unknown5,
		.set = py_netr_DELTA_POLICY_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_POLICY_get_unknown6,
		.set = py_netr_DELTA_POLICY_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_POLICY_get_unknown7,
		.set = py_netr_DELTA_POLICY_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_POLICY_get_unknown8,
		.set = py_netr_DELTA_POLICY_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_POLICY_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_POLICY",
	.tp_getset = py_netr_DELTA_POLICY_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_POLICY_new,
};


static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
	return py_domain_name;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_num_controllers;
	py_num_controllers = PyLong_FromUnsignedLongLong((uint32_t)(object->num_controllers));
	return py_num_controllers;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_controllers");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_controllers));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_controllers = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_controller_names;
	if (object->controller_names == NULL) {
		Py_RETURN_NONE;
	}
	if (object->controller_names == NULL) {
		py_controller_names = Py_None;
		Py_INCREF(py_controller_names);
	} else {
		py_controller_names = PyList_New(object->num_controllers);
		if (py_controller_names == NULL) {
			return NULL;
		}
		{
			int controller_names_cntr_1;
			for (controller_names_cntr_1 = 0; controller_names_cntr_1 < (object->num_controllers); controller_names_cntr_1++) {
				PyObject *py_controller_names_1;
				py_controller_names_1 = pytalloc_reference_ex(lsa_String_Type, object->controller_names, &(object->controller_names)[controller_names_cntr_1]);
				PyList_SetItem(py_controller_names, controller_names_cntr_1, py_controller_names_1);
			}
		}
	}
	return py_controller_names;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->controller_names));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->controller_names");
		return -1;
	}
	if (value == Py_None) {
		object->controller_names = NULL;
	} else {
		object->controller_names = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int controller_names_cntr_1;
			object->controller_names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->controller_names, PyList_GET_SIZE(value));
			if (!object->controller_names) { return -1; }
			talloc_set_name_const(object->controller_names, "ARRAY: object->controller_names");
			for (controller_names_cntr_1 = 0; controller_names_cntr_1 < PyList_GET_SIZE(value); controller_names_cntr_1++) {
				if (PyList_GET_ITEM(value, controller_names_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->controller_names)[controller_names_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, controller_names_cntr_1), return -1;);
				if (talloc_reference(object->controller_names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, controller_names_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->controller_names)[controller_names_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, controller_names_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_posix_offset;
	py_posix_offset = PyLong_FromUnsignedLongLong((uint32_t)(object->posix_offset));
	return py_posix_offset;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->posix_offset");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->posix_offset));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->posix_offset = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_TRUSTED_DOMAIN *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_TRUSTED_DOMAIN_getsetters[] = {
	{
		.name = discard_const_p(char, "domain_name"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "num_controllers"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "controller_names"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "posix_offset"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8,
		.set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_TRUSTED_DOMAIN",
	.tp_getset = py_netr_DELTA_TRUSTED_DOMAIN_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_TRUSTED_DOMAIN_new,
};


static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_entries(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_privilege_entries;
	py_privilege_entries = PyLong_FromUnsignedLongLong((uint32_t)(object->privilege_entries));
	return py_privilege_entries;
}

static int py_netr_DELTA_ACCOUNT_set_privilege_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_entries");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_entries));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->privilege_entries = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_control(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_privilege_control;
	py_privilege_control = PyLong_FromUnsignedLongLong((uint32_t)(object->privilege_control));
	return py_privilege_control;
}

static int py_netr_DELTA_ACCOUNT_set_privilege_control(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_control");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_control));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->privilege_control = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_attrib(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_privilege_attrib;
	if (object->privilege_attrib == NULL) {
		Py_RETURN_NONE;
	}
	if (object->privilege_attrib == NULL) {
		py_privilege_attrib = Py_None;
		Py_INCREF(py_privilege_attrib);
	} else {
		py_privilege_attrib = PyList_New(object->privilege_entries);
		if (py_privilege_attrib == NULL) {
			return NULL;
		}
		{
			int privilege_attrib_cntr_1;
			for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < (object->privilege_entries); privilege_attrib_cntr_1++) {
				PyObject *py_privilege_attrib_1;
				py_privilege_attrib_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->privilege_attrib)[privilege_attrib_cntr_1]));
				PyList_SetItem(py_privilege_attrib, privilege_attrib_cntr_1, py_privilege_attrib_1);
			}
		}
	}
	return py_privilege_attrib;
}

static int py_netr_DELTA_ACCOUNT_set_privilege_attrib(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_attrib));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_attrib");
		return -1;
	}
	if (value == Py_None) {
		object->privilege_attrib = NULL;
	} else {
		object->privilege_attrib = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int privilege_attrib_cntr_1;
			object->privilege_attrib = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_attrib, PyList_GET_SIZE(value));
			if (!object->privilege_attrib) { return -1; }
			talloc_set_name_const(object->privilege_attrib, "ARRAY: object->privilege_attrib");
			for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < PyList_GET_SIZE(value); privilege_attrib_cntr_1++) {
				if (PyList_GET_ITEM(value, privilege_attrib_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->privilege_attrib)[privilege_attrib_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->privilege_attrib)[privilege_attrib_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, privilege_attrib_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, privilege_attrib_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->privilege_attrib)[privilege_attrib_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_name(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_privilege_name;
	if (object->privilege_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->privilege_name == NULL) {
		py_privilege_name = Py_None;
		Py_INCREF(py_privilege_name);
	} else {
		py_privilege_name = PyList_New(object->privilege_entries);
		if (py_privilege_name == NULL) {
			return NULL;
		}
		{
			int privilege_name_cntr_1;
			for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < (object->privilege_entries); privilege_name_cntr_1++) {
				PyObject *py_privilege_name_1;
				py_privilege_name_1 = pytalloc_reference_ex(lsa_String_Type, object->privilege_name, &(object->privilege_name)[privilege_name_cntr_1]);
				PyList_SetItem(py_privilege_name, privilege_name_cntr_1, py_privilege_name_1);
			}
		}
	}
	return py_privilege_name;
}

static int py_netr_DELTA_ACCOUNT_set_privilege_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_name));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->privilege_name");
		return -1;
	}
	if (value == Py_None) {
		object->privilege_name = NULL;
	} else {
		object->privilege_name = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int privilege_name_cntr_1;
			object->privilege_name = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_name, PyList_GET_SIZE(value));
			if (!object->privilege_name) { return -1; }
			talloc_set_name_const(object->privilege_name, "ARRAY: object->privilege_name");
			for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < PyList_GET_SIZE(value); privilege_name_cntr_1++) {
				if (PyList_GET_ITEM(value, privilege_name_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->privilege_name)[privilege_name_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, privilege_name_cntr_1), return -1;);
				if (talloc_reference(object->privilege_name, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, privilege_name_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->privilege_name)[privilege_name_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, privilege_name_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_quotalimits(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_quotalimits;
	py_quotalimits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quotalimits);
	return py_quotalimits;
}

static int py_netr_DELTA_ACCOUNT_set_quotalimits(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->quotalimits");
		return -1;
	}
	PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->quotalimits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_system_flags(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_system_flags;
	py_system_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->system_flags));
	return py_system_flags;
}

static int py_netr_DELTA_ACCOUNT_set_system_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->system_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->system_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->system_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_ACCOUNT_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_ACCOUNT_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_DELTA_ACCOUNT_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_ACCOUNT_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_ACCOUNT_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_ACCOUNT_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_ACCOUNT_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_ACCOUNT_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_ACCOUNT_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ACCOUNT_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_ACCOUNT_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ACCOUNT *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_ACCOUNT_getsetters[] = {
	{
		.name = discard_const_p(char, "privilege_entries"),
		.get = py_netr_DELTA_ACCOUNT_get_privilege_entries,
		.set = py_netr_DELTA_ACCOUNT_set_privilege_entries,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "privilege_control"),
		.get = py_netr_DELTA_ACCOUNT_get_privilege_control,
		.set = py_netr_DELTA_ACCOUNT_set_privilege_control,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "privilege_attrib"),
		.get = py_netr_DELTA_ACCOUNT_get_privilege_attrib,
		.set = py_netr_DELTA_ACCOUNT_set_privilege_attrib,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "privilege_name"),
		.get = py_netr_DELTA_ACCOUNT_get_privilege_name,
		.set = py_netr_DELTA_ACCOUNT_set_privilege_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "quotalimits"),
		.get = py_netr_DELTA_ACCOUNT_get_quotalimits,
		.set = py_netr_DELTA_ACCOUNT_set_quotalimits,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
	},
	{
		.name = discard_const_p(char, "system_flags"),
		.get = py_netr_DELTA_ACCOUNT_get_system_flags,
		.set = py_netr_DELTA_ACCOUNT_set_system_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_ACCOUNT_get_SecurityInformation,
		.set = py_netr_DELTA_ACCOUNT_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_ACCOUNT_get_sdbuf,
		.set = py_netr_DELTA_ACCOUNT_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown1,
		.set = py_netr_DELTA_ACCOUNT_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown2,
		.set = py_netr_DELTA_ACCOUNT_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown3,
		.set = py_netr_DELTA_ACCOUNT_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown4,
		.set = py_netr_DELTA_ACCOUNT_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown5,
		.set = py_netr_DELTA_ACCOUNT_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown6,
		.set = py_netr_DELTA_ACCOUNT_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown7,
		.set = py_netr_DELTA_ACCOUNT_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_ACCOUNT_get_unknown8,
		.set = py_netr_DELTA_ACCOUNT_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_ACCOUNT_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_ACCOUNT",
	.tp_getset = py_netr_DELTA_ACCOUNT_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_ACCOUNT_new,
};


static PyObject *py_netr_CIPHER_VALUE_get_len(PyObject *obj, void *closure)
{
	struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(obj);
	PyObject *py_len;
	py_len = PyLong_FromUnsignedLongLong((uint32_t)(object->len));
	return py_len;
}

static int py_netr_CIPHER_VALUE_set_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->len");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->len));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->len = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_CIPHER_VALUE_get_maxlen(PyObject *obj, void *closure)
{
	struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(obj);
	PyObject *py_maxlen;
	py_maxlen = PyLong_FromUnsignedLongLong((uint32_t)(object->maxlen));
	return py_maxlen;
}

static int py_netr_CIPHER_VALUE_set_maxlen(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->maxlen");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlen));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->maxlen = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_CIPHER_VALUE_get_cipher_data(PyObject *obj, void *closure)
{
	struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(obj);
	PyObject *py_cipher_data;
	if (object->cipher_data == NULL) {
		Py_RETURN_NONE;
	}
	if (object->cipher_data == NULL) {
		py_cipher_data = Py_None;
		Py_INCREF(py_cipher_data);
	} else {
		py_cipher_data = PyList_New(object->len);
		if (py_cipher_data == NULL) {
			return NULL;
		}
		{
			int cipher_data_cntr_1;
			for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < (object->len); cipher_data_cntr_1++) {
				PyObject *py_cipher_data_1;
				py_cipher_data_1 = PyLong_FromLong((uint16_t)((object->cipher_data)[cipher_data_cntr_1]));
				PyList_SetItem(py_cipher_data, cipher_data_cntr_1, py_cipher_data_1);
			}
		}
	}
	return py_cipher_data;
}

static int py_netr_CIPHER_VALUE_set_cipher_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_CIPHER_VALUE *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->cipher_data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->cipher_data");
		return -1;
	}
	if (value == Py_None) {
		object->cipher_data = NULL;
	} else {
		object->cipher_data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int cipher_data_cntr_1;
			object->cipher_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cipher_data, PyList_GET_SIZE(value));
			if (!object->cipher_data) { return -1; }
			talloc_set_name_const(object->cipher_data, "ARRAY: object->cipher_data");
			for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < PyList_GET_SIZE(value); cipher_data_cntr_1++) {
				if (PyList_GET_ITEM(value, cipher_data_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->cipher_data)[cipher_data_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->cipher_data)[cipher_data_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, cipher_data_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, cipher_data_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->cipher_data)[cipher_data_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_CIPHER_VALUE_getsetters[] = {
	{
		.name = discard_const_p(char, "len"),
		.get = py_netr_CIPHER_VALUE_get_len,
		.set = py_netr_CIPHER_VALUE_set_len,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "maxlen"),
		.get = py_netr_CIPHER_VALUE_get_maxlen,
		.set = py_netr_CIPHER_VALUE_set_maxlen,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "cipher_data"),
		.get = py_netr_CIPHER_VALUE_get_cipher_data,
		.set = py_netr_CIPHER_VALUE_set_cipher_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_CIPHER_VALUE_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_CIPHER_VALUE",
	.tp_getset = py_netr_CIPHER_VALUE_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_CIPHER_VALUE_new,
};


static PyObject *py_netr_DELTA_SECRET_get_current_cipher(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_current_cipher;
	py_current_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->current_cipher);
	return py_current_cipher;
}

static int py_netr_DELTA_SECRET_set_current_cipher(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->current_cipher");
		return -1;
	}
	PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->current_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_current_cipher_set_time(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_current_cipher_set_time;
	py_current_cipher_set_time = PyLong_FromUnsignedLongLong(object->current_cipher_set_time);
	return py_current_cipher_set_time;
}

static int py_netr_DELTA_SECRET_set_current_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->current_cipher_set_time");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_cipher_set_time));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->current_cipher_set_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_old_cipher(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_old_cipher;
	py_old_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->old_cipher);
	return py_old_cipher;
}

static int py_netr_DELTA_SECRET_set_old_cipher(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->old_cipher");
		return -1;
	}
	PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->old_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_old_cipher_set_time(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_old_cipher_set_time;
	py_old_cipher_set_time = PyLong_FromUnsignedLongLong(object->old_cipher_set_time);
	return py_old_cipher_set_time;
}

static int py_netr_DELTA_SECRET_set_old_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->old_cipher_set_time");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->old_cipher_set_time));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->old_cipher_set_time = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_SecurityInformation(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_SecurityInformation;
	py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)(object->SecurityInformation));
	return py_SecurityInformation;
}

static int py_netr_DELTA_SECRET_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SecurityInformation");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SecurityInformation = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_sdbuf(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_sdbuf;
	py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
	return py_sdbuf;
}

static int py_netr_DELTA_SECRET_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sdbuf");
		return -1;
	}
	PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
	return py_unknown1;
}

static int py_netr_DELTA_SECRET_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
	return py_unknown2;
}

static int py_netr_DELTA_SECRET_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
	return py_unknown3;
}

static int py_netr_DELTA_SECRET_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
	return py_unknown4;
}

static int py_netr_DELTA_SECRET_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_DELTA_SECRET_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown6(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown6;
	py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
	return py_unknown6;
}

static int py_netr_DELTA_SECRET_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown6");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown6 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown7(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown7;
	py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown7));
	return py_unknown7;
}

static int py_netr_DELTA_SECRET_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown7");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown7 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_SECRET_get_unknown8(PyObject *obj, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown8;
	py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown8));
	return py_unknown8;
}

static int py_netr_DELTA_SECRET_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_SECRET *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown8");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown8 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_SECRET_getsetters[] = {
	{
		.name = discard_const_p(char, "current_cipher"),
		.get = py_netr_DELTA_SECRET_get_current_cipher,
		.set = py_netr_DELTA_SECRET_set_current_cipher,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
	},
	{
		.name = discard_const_p(char, "current_cipher_set_time"),
		.get = py_netr_DELTA_SECRET_get_current_cipher_set_time,
		.set = py_netr_DELTA_SECRET_set_current_cipher_set_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "old_cipher"),
		.get = py_netr_DELTA_SECRET_get_old_cipher,
		.set = py_netr_DELTA_SECRET_set_old_cipher,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
	},
	{
		.name = discard_const_p(char, "old_cipher_set_time"),
		.get = py_netr_DELTA_SECRET_get_old_cipher_set_time,
		.set = py_netr_DELTA_SECRET_set_old_cipher_set_time,
		.doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
	},
	{
		.name = discard_const_p(char, "SecurityInformation"),
		.get = py_netr_DELTA_SECRET_get_SecurityInformation,
		.set = py_netr_DELTA_SECRET_set_SecurityInformation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sdbuf"),
		.get = py_netr_DELTA_SECRET_get_sdbuf,
		.set = py_netr_DELTA_SECRET_set_sdbuf,
		.doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_DELTA_SECRET_get_unknown1,
		.set = py_netr_DELTA_SECRET_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_DELTA_SECRET_get_unknown2,
		.set = py_netr_DELTA_SECRET_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_DELTA_SECRET_get_unknown3,
		.set = py_netr_DELTA_SECRET_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_DELTA_SECRET_get_unknown4,
		.set = py_netr_DELTA_SECRET_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_DELTA_SECRET_get_unknown5,
		.set = py_netr_DELTA_SECRET_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown6"),
		.get = py_netr_DELTA_SECRET_get_unknown6,
		.set = py_netr_DELTA_SECRET_set_unknown6,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown7"),
		.get = py_netr_DELTA_SECRET_get_unknown7,
		.set = py_netr_DELTA_SECRET_set_unknown7,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown8"),
		.get = py_netr_DELTA_SECRET_get_unknown8,
		.set = py_netr_DELTA_SECRET_set_unknown8,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_SECRET_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_SECRET",
	.tp_getset = py_netr_DELTA_SECRET_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_SECRET_new,
};

static PyObject *py_import_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_UNION *in)
{
	PyObject *ret;

	switch (level) {
		case NETR_DELTA_DOMAIN:
			if (in->domain == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_DOMAIN_Type, in->domain, in->domain);
			}
			return ret;

		case NETR_DELTA_GROUP:
			if (in->group == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_GROUP_Type, in->group, in->group);
			}
			return ret;

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

		case NETR_DELTA_RENAME_GROUP:
			if (in->rename_group == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_group, in->rename_group);
			}
			return ret;

		case NETR_DELTA_USER:
			if (in->user == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_USER_Type, in->user, in->user);
			}
			return ret;

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

		case NETR_DELTA_RENAME_USER:
			if (in->rename_user == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_user, in->rename_user);
			}
			return ret;

		case NETR_DELTA_GROUP_MEMBER:
			if (in->group_member == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_GROUP_MEMBER_Type, in->group_member, in->group_member);
			}
			return ret;

		case NETR_DELTA_ALIAS:
			if (in->alias == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_Type, in->alias, in->alias);
			}
			return ret;

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

		case NETR_DELTA_RENAME_ALIAS:
			if (in->rename_alias == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_alias, in->rename_alias);
			}
			return ret;

		case NETR_DELTA_ALIAS_MEMBER:
			if (in->alias_member == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_MEMBER_Type, in->alias_member, in->alias_member);
			}
			return ret;

		case NETR_DELTA_POLICY:
			if (in->policy == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_POLICY_Type, in->policy, in->policy);
			}
			return ret;

		case NETR_DELTA_TRUSTED_DOMAIN:
			if (in->trusted_domain == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_TRUSTED_DOMAIN_Type, in->trusted_domain, in->trusted_domain);
			}
			return ret;

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

		case NETR_DELTA_ACCOUNT:
			if (in->account == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_ACCOUNT_Type, in->account, in->account);
			}
			return ret;

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

		case NETR_DELTA_SECRET:
			if (in->secret == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_SECRET_Type, in->secret, in->secret);
			}
			return ret;

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

		case NETR_DELTA_DELETE_GROUP2:
			if (in->delete_group == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_group, in->delete_group);
			}
			return ret;

		case NETR_DELTA_DELETE_USER2:
			if (in->delete_user == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_user, in->delete_user);
			}
			return ret;

		case NETR_DELTA_MODIFY_COUNT:
			if (in->modified_count == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = PyLong_FromUnsignedLongLong(*in->modified_count);
			}
			return ret;

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

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

static union netr_DELTA_UNION *py_export_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_DELTA_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_UNION);
	switch (level) {
		case NETR_DELTA_DOMAIN:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->domain = NULL;
			} else {
				ret->domain = NULL;
				PY_CHECK_TYPE(&netr_DELTA_DOMAIN_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->domain = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_GROUP:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->group");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->group = NULL;
			} else {
				ret->group = NULL;
				PY_CHECK_TYPE(&netr_DELTA_GROUP_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->group = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_GROUP:
			break;

		case NETR_DELTA_RENAME_GROUP:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rename_group");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->rename_group = NULL;
			} else {
				ret->rename_group = NULL;
				PY_CHECK_TYPE(&netr_DELTA_RENAME_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->rename_group = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_USER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->user");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->user = NULL;
			} else {
				ret->user = NULL;
				PY_CHECK_TYPE(&netr_DELTA_USER_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->user = (struct netr_DELTA_USER *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_USER:
			break;

		case NETR_DELTA_RENAME_USER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rename_user");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->rename_user = NULL;
			} else {
				ret->rename_user = NULL;
				PY_CHECK_TYPE(&netr_DELTA_RENAME_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->rename_user = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_GROUP_MEMBER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->group_member");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->group_member = NULL;
			} else {
				ret->group_member = NULL;
				PY_CHECK_TYPE(&netr_DELTA_GROUP_MEMBER_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->group_member = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_ALIAS:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->alias");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->alias = NULL;
			} else {
				ret->alias = NULL;
				PY_CHECK_TYPE(&netr_DELTA_ALIAS_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->alias = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_ALIAS:
			break;

		case NETR_DELTA_RENAME_ALIAS:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rename_alias");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->rename_alias = NULL;
			} else {
				ret->rename_alias = NULL;
				PY_CHECK_TYPE(&netr_DELTA_RENAME_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->rename_alias = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_ALIAS_MEMBER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->alias_member");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->alias_member = NULL;
			} else {
				ret->alias_member = NULL;
				PY_CHECK_TYPE(&netr_DELTA_ALIAS_MEMBER_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->alias_member = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_POLICY:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->policy");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->policy = NULL;
			} else {
				ret->policy = NULL;
				PY_CHECK_TYPE(&netr_DELTA_POLICY_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->policy = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_TRUSTED_DOMAIN:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->trusted_domain");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->trusted_domain = NULL;
			} else {
				ret->trusted_domain = NULL;
				PY_CHECK_TYPE(&netr_DELTA_TRUSTED_DOMAIN_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->trusted_domain = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_TRUST:
			break;

		case NETR_DELTA_ACCOUNT:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->account");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->account = NULL;
			} else {
				ret->account = NULL;
				PY_CHECK_TYPE(&netr_DELTA_ACCOUNT_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->account = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_ACCOUNT:
			break;

		case NETR_DELTA_SECRET:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->secret");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->secret = NULL;
			} else {
				ret->secret = NULL;
				PY_CHECK_TYPE(&netr_DELTA_SECRET_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->secret = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_SECRET:
			break;

		case NETR_DELTA_DELETE_GROUP2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->delete_group");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->delete_group = NULL;
			} else {
				ret->delete_group = NULL;
				PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_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->delete_group = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_USER2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->delete_user");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->delete_user = NULL;
			} else {
				ret->delete_user = NULL;
				PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_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->delete_user = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_MODIFY_COUNT:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->modified_count");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->modified_count = NULL;
			} else {
				ret->modified_count = talloc_ptrtype(mem_ctx, ret->modified_count);
				if (ret->modified_count == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*ret->modified_count));
					if (PyLong_Check(in)) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(in);
						if (PyErr_Occurred() != NULL) {
							talloc_free(ret); return NULL;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							talloc_free(ret); return NULL;
						}
						*ret->modified_count = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						talloc_free(ret); return NULL;
					}
				}
			}
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_DELTA_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_DELTA_UNION *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_DELTA_UNION *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_UNION!");
		return NULL;
	}

	return py_import_netr_DELTA_UNION(mem_ctx, level, in);
}

static PyObject *py_netr_DELTA_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_DELTA_UNION *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_DELTA_UNION(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_DELTA_UNION_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_DELTA_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_DELTA_UNION_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_UNION",
	.tp_getset = NULL,
	.tp_methods = py_netr_DELTA_UNION_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_UNION_new,
};

static PyObject *py_import_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_ID_UNION *in)
{
	PyObject *ret;

	switch (level) {
		case NETR_DELTA_DOMAIN:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_GROUP:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_DELETE_GROUP:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_RENAME_GROUP:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_USER:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_DELETE_USER:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_RENAME_USER:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_GROUP_MEMBER:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_ALIAS:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_DELETE_ALIAS:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_RENAME_ALIAS:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_ALIAS_MEMBER:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_POLICY:
			if (in->sid == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
			}
			return ret;

		case NETR_DELTA_TRUSTED_DOMAIN:
			if (in->sid == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
			}
			return ret;

		case NETR_DELTA_DELETE_TRUST:
			if (in->sid == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
			}
			return ret;

		case NETR_DELTA_ACCOUNT:
			if (in->sid == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
			}
			return ret;

		case NETR_DELTA_DELETE_ACCOUNT:
			if (in->sid == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
			}
			return ret;

		case NETR_DELTA_SECRET:
			if (in->name == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->name == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
				}
			}
			return ret;

		case NETR_DELTA_DELETE_SECRET:
			if (in->name == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->name == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
				}
			}
			return ret;

		case NETR_DELTA_DELETE_GROUP2:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_DELETE_USER2:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->rid));
			return ret;

		case NETR_DELTA_MODIFY_COUNT:
			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;
}

static union netr_DELTA_ID_UNION *py_export_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_DELTA_ID_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_ID_UNION);
	switch (level) {
		case NETR_DELTA_DOMAIN:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_GROUP:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_DELETE_GROUP:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_RENAME_GROUP:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_USER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_DELETE_USER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_RENAME_USER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_GROUP_MEMBER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_ALIAS:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_DELETE_ALIAS:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_RENAME_ALIAS:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_ALIAS_MEMBER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_POLICY:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sid = NULL;
			} else {
				ret->sid = NULL;
				PY_CHECK_TYPE(dom_sid_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->sid = (struct dom_sid *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_TRUSTED_DOMAIN:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sid = NULL;
			} else {
				ret->sid = NULL;
				PY_CHECK_TYPE(dom_sid_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->sid = (struct dom_sid *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_TRUST:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sid = NULL;
			} else {
				ret->sid = NULL;
				PY_CHECK_TYPE(dom_sid_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->sid = (struct dom_sid *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_ACCOUNT:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sid = NULL;
			} else {
				ret->sid = NULL;
				PY_CHECK_TYPE(dom_sid_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->sid = (struct dom_sid *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_DELETE_ACCOUNT:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->sid");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->sid = NULL;
			} else {
				ret->sid = NULL;
				PY_CHECK_TYPE(dom_sid_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->sid = (struct dom_sid *)pytalloc_get_ptr(in);
			}
			break;

		case NETR_DELTA_SECRET:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->name = NULL;
			} else {
				ret->name = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->name = talloc_str;
				}
			}
			break;

		case NETR_DELTA_DELETE_SECRET:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->name = NULL;
			} else {
				ret->name = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->name = talloc_str;
				}
			}
			break;

		case NETR_DELTA_DELETE_GROUP2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_DELETE_USER2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->rid");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->rid = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case NETR_DELTA_MODIFY_COUNT:
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_DELTA_ID_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_DELTA_ID_UNION *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_DELTA_ID_UNION *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_ID_UNION!");
		return NULL;
	}

	return py_import_netr_DELTA_ID_UNION(mem_ctx, level, in);
}

static PyObject *py_netr_DELTA_ID_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_DELTA_ID_UNION *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_DELTA_ID_UNION(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_DELTA_ID_UNION_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_DELTA_ID_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_DELTA_ID_UNION_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_ID_UNION",
	.tp_getset = NULL,
	.tp_methods = py_netr_DELTA_ID_UNION_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_ID_UNION_new,
};


static PyObject *py_netr_DELTA_ENUM_get_delta_type(PyObject *obj, void *closure)
{
	struct netr_DELTA_ENUM *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_type;
	py_delta_type = PyLong_FromLong((uint16_t)(object->delta_type));
	return py_delta_type;
}

static int py_netr_DELTA_ENUM_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ENUM *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->delta_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ENUM_get_delta_id_union(PyObject *obj, void *closure)
{
	struct netr_DELTA_ENUM *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_id_union;
	py_delta_id_union = pyrpc_import_union(&netr_DELTA_ID_UNION_Type, pytalloc_get_mem_ctx(obj), object->delta_type, &object->delta_id_union, "union netr_DELTA_ID_UNION");
	if (py_delta_id_union == NULL) {
		return NULL;
	}
	return py_delta_id_union;
}

static int py_netr_DELTA_ENUM_set_delta_id_union(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ENUM *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_id_union");
		return -1;
	}
	{
		union netr_DELTA_ID_UNION *delta_id_union_switch_0;
		delta_id_union_switch_0 = (union netr_DELTA_ID_UNION *)pyrpc_export_union(&netr_DELTA_ID_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->delta_type, value, "union netr_DELTA_ID_UNION");
		if (delta_id_union_switch_0 == NULL) {
			return -1;
		}
		object->delta_id_union = *delta_id_union_switch_0;
	}
	return 0;
}

static PyObject *py_netr_DELTA_ENUM_get_delta_union(PyObject *obj, void *closure)
{
	struct netr_DELTA_ENUM *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_union;
	py_delta_union = pyrpc_import_union(&netr_DELTA_UNION_Type, pytalloc_get_mem_ctx(obj), object->delta_type, &object->delta_union, "union netr_DELTA_UNION");
	if (py_delta_union == NULL) {
		return NULL;
	}
	return py_delta_union;
}

static int py_netr_DELTA_ENUM_set_delta_union(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ENUM *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_union");
		return -1;
	}
	{
		union netr_DELTA_UNION *delta_union_switch_0;
		delta_union_switch_0 = (union netr_DELTA_UNION *)pyrpc_export_union(&netr_DELTA_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->delta_type, value, "union netr_DELTA_UNION");
		if (delta_union_switch_0 == NULL) {
			return -1;
		}
		object->delta_union = *delta_union_switch_0;
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_ENUM_getsetters[] = {
	{
		.name = discard_const_p(char, "delta_type"),
		.get = py_netr_DELTA_ENUM_get_delta_type,
		.set = py_netr_DELTA_ENUM_set_delta_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum")
	},
	{
		.name = discard_const_p(char, "delta_id_union"),
		.get = py_netr_DELTA_ENUM_get_delta_id_union,
		.set = py_netr_DELTA_ENUM_set_delta_id_union,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ID_UNION")
	},
	{
		.name = discard_const_p(char, "delta_union"),
		.get = py_netr_DELTA_ENUM_get_delta_union,
		.set = py_netr_DELTA_ENUM_set_delta_union,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_UNION")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_ENUM_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_ENUM",
	.tp_getset = py_netr_DELTA_ENUM_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_ENUM_new,
};


static PyObject *py_netr_DELTA_ENUM_ARRAY_get_num_deltas(PyObject *obj, void *closure)
{
	struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(obj);
	PyObject *py_num_deltas;
	py_num_deltas = PyLong_FromUnsignedLongLong((uint32_t)(object->num_deltas));
	return py_num_deltas;
}

static int py_netr_DELTA_ENUM_ARRAY_set_num_deltas(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_deltas");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_deltas));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_deltas = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DELTA_ENUM_ARRAY_get_delta_enum(PyObject *obj, void *closure)
{
	struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_enum;
	if (object->delta_enum == NULL) {
		Py_RETURN_NONE;
	}
	if (object->delta_enum == NULL) {
		py_delta_enum = Py_None;
		Py_INCREF(py_delta_enum);
	} else {
		py_delta_enum = PyList_New(object->num_deltas);
		if (py_delta_enum == NULL) {
			return NULL;
		}
		{
			int delta_enum_cntr_1;
			for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < (object->num_deltas); delta_enum_cntr_1++) {
				PyObject *py_delta_enum_1;
				py_delta_enum_1 = pytalloc_reference_ex(&netr_DELTA_ENUM_Type, object->delta_enum, &(object->delta_enum)[delta_enum_cntr_1]);
				PyList_SetItem(py_delta_enum, delta_enum_cntr_1, py_delta_enum_1);
			}
		}
	}
	return py_delta_enum;
}

static int py_netr_DELTA_ENUM_ARRAY_set_delta_enum(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DELTA_ENUM_ARRAY *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->delta_enum));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_enum");
		return -1;
	}
	if (value == Py_None) {
		object->delta_enum = NULL;
	} else {
		object->delta_enum = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int delta_enum_cntr_1;
			object->delta_enum = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->delta_enum, PyList_GET_SIZE(value));
			if (!object->delta_enum) { return -1; }
			talloc_set_name_const(object->delta_enum, "ARRAY: object->delta_enum");
			for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < PyList_GET_SIZE(value); delta_enum_cntr_1++) {
				if (PyList_GET_ITEM(value, delta_enum_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->delta_enum)[delta_enum_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&netr_DELTA_ENUM_Type, PyList_GET_ITEM(value, delta_enum_cntr_1), return -1;);
				if (talloc_reference(object->delta_enum, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, delta_enum_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->delta_enum)[delta_enum_cntr_1] = *(struct netr_DELTA_ENUM *)pytalloc_get_ptr(PyList_GET_ITEM(value, delta_enum_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DELTA_ENUM_ARRAY_getsetters[] = {
	{
		.name = discard_const_p(char, "num_deltas"),
		.get = py_netr_DELTA_ENUM_ARRAY_get_num_deltas,
		.set = py_netr_DELTA_ENUM_ARRAY_set_num_deltas,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "delta_enum"),
		.get = py_netr_DELTA_ENUM_ARRAY_get_delta_enum,
		.set = py_netr_DELTA_ENUM_ARRAY_set_delta_enum,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DELTA_ENUM_ARRAY_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DELTA_ENUM_ARRAY",
	.tp_getset = py_netr_DELTA_ENUM_ARRAY_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DELTA_ENUM_ARRAY_new,
};


static PyObject *py_netr_UAS_INFO_0_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	py_computer_name = PyList_New(16);
	if (py_computer_name == NULL) {
		return NULL;
	}
	{
		int computer_name_cntr_0;
		for (computer_name_cntr_0 = 0; computer_name_cntr_0 < (16); computer_name_cntr_0++) {
			PyObject *py_computer_name_0;
			py_computer_name_0 = PyLong_FromLong((uint16_t)((object->computer_name)[computer_name_cntr_0]));
			PyList_SetItem(py_computer_name, computer_name_cntr_0, py_computer_name_0);
		}
	}
	return py_computer_name;
}

static int py_netr_UAS_INFO_0_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->computer_name");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int computer_name_cntr_0;
		if (ARRAY_SIZE(object->computer_name) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->computer_name),  PyList_GET_SIZE(value));
			return -1;
		}
		for (computer_name_cntr_0 = 0; computer_name_cntr_0 < PyList_GET_SIZE(value); computer_name_cntr_0++) {
			if (PyList_GET_ITEM(value, computer_name_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->computer_name)[computer_name_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->computer_name)[computer_name_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, computer_name_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, computer_name_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->computer_name)[computer_name_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_UAS_INFO_0_get_timecreated(PyObject *obj, void *closure)
{
	struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(obj);
	PyObject *py_timecreated;
	py_timecreated = PyLong_FromUnsignedLongLong((uint32_t)(object->timecreated));
	return py_timecreated;
}

static int py_netr_UAS_INFO_0_set_timecreated(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->timecreated");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timecreated));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->timecreated = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_UAS_INFO_0_get_serial_number(PyObject *obj, void *closure)
{
	struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(obj);
	PyObject *py_serial_number;
	py_serial_number = PyLong_FromUnsignedLongLong((uint32_t)(object->serial_number));
	return py_serial_number;
}

static int py_netr_UAS_INFO_0_set_serial_number(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_UAS_INFO_0 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->serial_number");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->serial_number = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_UAS_INFO_0_getsetters[] = {
	{
		.name = discard_const_p(char, "computer_name"),
		.get = py_netr_UAS_INFO_0_get_computer_name,
		.set = py_netr_UAS_INFO_0_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "timecreated"),
		.get = py_netr_UAS_INFO_0_get_timecreated,
		.set = py_netr_UAS_INFO_0_set_timecreated,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "serial_number"),
		.get = py_netr_UAS_INFO_0_get_serial_number,
		.set = py_netr_UAS_INFO_0_set_serial_number,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_UAS_INFO_0_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_UAS_INFO_0",
	.tp_getset = py_netr_UAS_INFO_0_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_UAS_INFO_0_new,
};


static PyObject *py_netr_AccountBuffer_get_blob(PyObject *obj, void *closure)
{
	struct netr_AccountBuffer *object = pytalloc_get_ptr(obj);
	PyObject *py_blob;
	py_blob = PyBytes_FromStringAndSize((char *)(object->blob).data, (object->blob).length);
	return py_blob;
}

static int py_netr_AccountBuffer_set_blob(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountBuffer *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->blob");
		return -1;
	}
	if (!PyBytes_Check(value)) {
		PyErr_Format(PyExc_TypeError, "Expected bytes object, got %s", Py_TYPE(value)->tp_name);
		return -1;
	}
	object->blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_netr_AccountBuffer_getsetters[] = {
	{
		.name = discard_const_p(char, "blob"),
		.get = py_netr_AccountBuffer_get_blob,
		.set = py_netr_AccountBuffer_set_blob,
		.doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_AccountBuffer_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_AccountBuffer",
	.tp_getset = py_netr_AccountBuffer_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_AccountBuffer_new,
};


static PyObject *py_netr_NETLOGON_INFO_1_get_flags(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_netr_NETLOGON_INFO_1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_1_get_pdc_connection_status(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(obj);
	PyObject *py_pdc_connection_status;
	py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
	return py_pdc_connection_status;
}

static int py_netr_NETLOGON_INFO_1_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_1 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pdc_connection_status");
		return -1;
	}
	object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_NETLOGON_INFO_1_getsetters[] = {
	{
		.name = discard_const_p(char, "flags"),
		.get = py_netr_NETLOGON_INFO_1_get_flags,
		.set = py_netr_NETLOGON_INFO_1_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
	},
	{
		.name = discard_const_p(char, "pdc_connection_status"),
		.get = py_netr_NETLOGON_INFO_1_get_pdc_connection_status,
		.set = py_netr_NETLOGON_INFO_1_set_pdc_connection_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_NETLOGON_INFO_1_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NETLOGON_INFO_1",
	.tp_getset = py_netr_NETLOGON_INFO_1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NETLOGON_INFO_1_new,
};


static PyObject *py_netr_NETLOGON_INFO_2_get_flags(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_netr_NETLOGON_INFO_2_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_2_get_pdc_connection_status(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
	PyObject *py_pdc_connection_status;
	py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
	return py_pdc_connection_status;
}

static int py_netr_NETLOGON_INFO_2_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pdc_connection_status");
		return -1;
	}
	object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_2_get_trusted_dc_name(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
	PyObject *py_trusted_dc_name;
	if (object->trusted_dc_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->trusted_dc_name == NULL) {
		py_trusted_dc_name = Py_None;
		Py_INCREF(py_trusted_dc_name);
	} else {
		if (object->trusted_dc_name == NULL) {
			py_trusted_dc_name = Py_None;
			Py_INCREF(py_trusted_dc_name);
		} else {
			py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
		}
	}
	return py_trusted_dc_name;
}

static int py_netr_NETLOGON_INFO_2_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_dc_name");
		return -1;
	}
	if (value == Py_None) {
		object->trusted_dc_name = NULL;
	} else {
		object->trusted_dc_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->trusted_dc_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_2_get_tc_connection_status(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(obj);
	PyObject *py_tc_connection_status;
	py_tc_connection_status = PyErr_FromWERROR(object->tc_connection_status);
	return py_tc_connection_status;
}

static int py_netr_NETLOGON_INFO_2_set_tc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->tc_connection_status");
		return -1;
	}
	object->tc_connection_status = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_NETLOGON_INFO_2_getsetters[] = {
	{
		.name = discard_const_p(char, "flags"),
		.get = py_netr_NETLOGON_INFO_2_get_flags,
		.set = py_netr_NETLOGON_INFO_2_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
	},
	{
		.name = discard_const_p(char, "pdc_connection_status"),
		.get = py_netr_NETLOGON_INFO_2_get_pdc_connection_status,
		.set = py_netr_NETLOGON_INFO_2_set_pdc_connection_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
	},
	{
		.name = discard_const_p(char, "trusted_dc_name"),
		.get = py_netr_NETLOGON_INFO_2_get_trusted_dc_name,
		.set = py_netr_NETLOGON_INFO_2_set_trusted_dc_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "tc_connection_status"),
		.get = py_netr_NETLOGON_INFO_2_get_tc_connection_status,
		.set = py_netr_NETLOGON_INFO_2_set_tc_connection_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_NETLOGON_INFO_2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NETLOGON_INFO_2",
	.tp_getset = py_netr_NETLOGON_INFO_2_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NETLOGON_INFO_2_new,
};


static PyObject *py_netr_NETLOGON_INFO_3_get_flags(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_netr_NETLOGON_INFO_3_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_3_get_logon_attempts(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_attempts;
	py_logon_attempts = PyLong_FromUnsignedLongLong((uint32_t)(object->logon_attempts));
	return py_logon_attempts;
}

static int py_netr_NETLOGON_INFO_3_set_logon_attempts(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->logon_attempts");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_attempts));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->logon_attempts = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_3_get_unknown1(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown1;
	py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
	return py_unknown1;
}

static int py_netr_NETLOGON_INFO_3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown1");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_3_get_unknown2(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown2;
	py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
	return py_unknown2;
}

static int py_netr_NETLOGON_INFO_3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown2");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown2 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_3_get_unknown3(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown3;
	py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown3));
	return py_unknown3;
}

static int py_netr_NETLOGON_INFO_3_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown3");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown3 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_3_get_unknown4(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown4;
	py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown4));
	return py_unknown4;
}

static int py_netr_NETLOGON_INFO_3_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown4");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown4 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_3_get_unknown5(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(obj);
	PyObject *py_unknown5;
	py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
	return py_unknown5;
}

static int py_netr_NETLOGON_INFO_3_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->unknown5");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->unknown5 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_NETLOGON_INFO_3_getsetters[] = {
	{
		.name = discard_const_p(char, "flags"),
		.get = py_netr_NETLOGON_INFO_3_get_flags,
		.set = py_netr_NETLOGON_INFO_3_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
	},
	{
		.name = discard_const_p(char, "logon_attempts"),
		.get = py_netr_NETLOGON_INFO_3_get_logon_attempts,
		.set = py_netr_NETLOGON_INFO_3_set_logon_attempts,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown1"),
		.get = py_netr_NETLOGON_INFO_3_get_unknown1,
		.set = py_netr_NETLOGON_INFO_3_set_unknown1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown2"),
		.get = py_netr_NETLOGON_INFO_3_get_unknown2,
		.set = py_netr_NETLOGON_INFO_3_set_unknown2,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown3"),
		.get = py_netr_NETLOGON_INFO_3_get_unknown3,
		.set = py_netr_NETLOGON_INFO_3_set_unknown3,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown4"),
		.get = py_netr_NETLOGON_INFO_3_get_unknown4,
		.set = py_netr_NETLOGON_INFO_3_set_unknown4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "unknown5"),
		.get = py_netr_NETLOGON_INFO_3_get_unknown5,
		.set = py_netr_NETLOGON_INFO_3_set_unknown5,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_NETLOGON_INFO_3_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NETLOGON_INFO_3",
	.tp_getset = py_netr_NETLOGON_INFO_3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NETLOGON_INFO_3_new,
};


static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_dc_name(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(obj);
	PyObject *py_trusted_dc_name;
	if (object->trusted_dc_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->trusted_dc_name == NULL) {
		py_trusted_dc_name = Py_None;
		Py_INCREF(py_trusted_dc_name);
	} else {
		if (object->trusted_dc_name == NULL) {
			py_trusted_dc_name = Py_None;
			Py_INCREF(py_trusted_dc_name);
		} else {
			py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
		}
	}
	return py_trusted_dc_name;
}

static int py_netr_NETLOGON_INFO_4_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_dc_name");
		return -1;
	}
	if (value == Py_None) {
		object->trusted_dc_name = NULL;
	} else {
		object->trusted_dc_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->trusted_dc_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_domain_name(PyObject *obj, void *closure)
{
	struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(obj);
	PyObject *py_trusted_domain_name;
	if (object->trusted_domain_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->trusted_domain_name == NULL) {
		py_trusted_domain_name = Py_None;
		Py_INCREF(py_trusted_domain_name);
	} else {
		if (object->trusted_domain_name == NULL) {
			py_trusted_domain_name = Py_None;
			Py_INCREF(py_trusted_domain_name);
		} else {
			py_trusted_domain_name = PyUnicode_Decode(object->trusted_domain_name, strlen(object->trusted_domain_name), "utf-8", "ignore");
		}
	}
	return py_trusted_domain_name;
}

static int py_netr_NETLOGON_INFO_4_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NETLOGON_INFO_4 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_domain_name");
		return -1;
	}
	if (value == Py_None) {
		object->trusted_domain_name = NULL;
	} else {
		object->trusted_domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->trusted_domain_name = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_NETLOGON_INFO_4_getsetters[] = {
	{
		.name = discard_const_p(char, "trusted_dc_name"),
		.get = py_netr_NETLOGON_INFO_4_get_trusted_dc_name,
		.set = py_netr_NETLOGON_INFO_4_set_trusted_dc_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "trusted_domain_name"),
		.get = py_netr_NETLOGON_INFO_4_get_trusted_domain_name,
		.set = py_netr_NETLOGON_INFO_4_set_trusted_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_NETLOGON_INFO_4_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NETLOGON_INFO_4",
	.tp_getset = py_netr_NETLOGON_INFO_4_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NETLOGON_INFO_4_new,
};

static PyObject *py_import_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_QUERY_INFORMATION *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			if (in->info1 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_1_Type, in->info1, in->info1);
			}
			return ret;

		case 2:
			if (in->info2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_2_Type, in->info2, in->info2);
			}
			return ret;

		case 3:
			if (in->info3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_3_Type, in->info3, in->info3);
			}
			return ret;

		case 4:
			if (in->info4 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_4_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;
}

static union netr_CONTROL_QUERY_INFORMATION *py_export_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_CONTROL_QUERY_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
	switch (level) {
		case 1:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info1");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info1 = NULL;
			} else {
				ret->info1 = NULL;
				PY_CHECK_TYPE(&netr_NETLOGON_INFO_1_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 netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info2");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info2 = NULL;
			} else {
				ret->info2 = NULL;
				PY_CHECK_TYPE(&netr_NETLOGON_INFO_2_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 netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info3");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info3 = NULL;
			} else {
				ret->info3 = NULL;
				PY_CHECK_TYPE(&netr_NETLOGON_INFO_3_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 netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(in);
			}
			break;

		case 4:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->info4");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->info4 = NULL;
			} else {
				ret->info4 = NULL;
				PY_CHECK_TYPE(&netr_NETLOGON_INFO_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->info4 = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(in);
			}
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_CONTROL_QUERY_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_CONTROL_QUERY_INFORMATION *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_CONTROL_QUERY_INFORMATION *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_QUERY_INFORMATION!");
		return NULL;
	}

	return py_import_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
}

static PyObject *py_netr_CONTROL_QUERY_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_CONTROL_QUERY_INFORMATION *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_CONTROL_QUERY_INFORMATION_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_CONTROL_QUERY_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_CONTROL_QUERY_INFORMATION",
	.tp_getset = NULL,
	.tp_methods = py_netr_CONTROL_QUERY_INFORMATION_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_CONTROL_QUERY_INFORMATION_new,
};

static PyObject *py_import_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_DATA_INFORMATION *in)
{
	PyObject *ret;

	switch (level) {
		case NETLOGON_CONTROL_REDISCOVER:
			if (in->domain == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->domain == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
				}
			}
			return ret;

		case NETLOGON_CONTROL_TC_QUERY:
			if (in->domain == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->domain == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
				}
			}
			return ret;

		case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
			if (in->domain == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->domain == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
				}
			}
			return ret;

		case NETLOGON_CONTROL_CHANGE_PASSWORD:
			if (in->domain == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->domain == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
				}
			}
			return ret;

		case NETLOGON_CONTROL_TC_VERIFY:
			if (in->domain == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->domain == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
				}
			}
			return ret;

		case NETLOGON_CONTROL_FIND_USER:
			if (in->user == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				if (in->user == NULL) {
					ret = Py_None;
					Py_INCREF(ret);
				} else {
					ret = PyUnicode_Decode(in->user, strlen(in->user), "utf-8", "ignore");
				}
			}
			return ret;

		case NETLOGON_CONTROL_SET_DBFLAG:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->debug_level));
			return ret;

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

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

static union netr_CONTROL_DATA_INFORMATION *py_export_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_CONTROL_DATA_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
	switch (level) {
		case NETLOGON_CONTROL_REDISCOVER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->domain = NULL;
			} else {
				ret->domain = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->domain = talloc_str;
				}
			}
			break;

		case NETLOGON_CONTROL_TC_QUERY:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->domain = NULL;
			} else {
				ret->domain = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->domain = talloc_str;
				}
			}
			break;

		case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->domain = NULL;
			} else {
				ret->domain = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->domain = talloc_str;
				}
			}
			break;

		case NETLOGON_CONTROL_CHANGE_PASSWORD:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->domain = NULL;
			} else {
				ret->domain = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->domain = talloc_str;
				}
			}
			break;

		case NETLOGON_CONTROL_TC_VERIFY:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->domain = NULL;
			} else {
				ret->domain = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->domain = talloc_str;
				}
			}
			break;

		case NETLOGON_CONTROL_FIND_USER:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->user");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->user = NULL;
			} else {
				ret->user = NULL;
				{
					const char *test_str;
					const char *talloc_str;
					PyObject *unicode = NULL;
					if (PyUnicode_Check(in)) {
						unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
						if (unicode == NULL) {
							talloc_free(ret); return NULL;
						}
						test_str = PyBytes_AS_STRING(unicode);
					} else if (PyBytes_Check(in)) {
						test_str = PyBytes_AS_STRING(in);
					} else {
						PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
						talloc_free(ret); return NULL;
					}
					talloc_str = talloc_strdup(mem_ctx, test_str);
					if (unicode != NULL) {
						Py_DECREF(unicode);
					}
					if (talloc_str == NULL) {
						PyErr_NoMemory();
						talloc_free(ret); return NULL;
					}
					ret->user = talloc_str;
				}
			}
			break;

		case NETLOGON_CONTROL_SET_DBFLAG:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->debug_level");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->debug_level));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->debug_level = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_CONTROL_DATA_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_CONTROL_DATA_INFORMATION *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_CONTROL_DATA_INFORMATION *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_DATA_INFORMATION!");
		return NULL;
	}

	return py_import_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
}

static PyObject *py_netr_CONTROL_DATA_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_CONTROL_DATA_INFORMATION *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_CONTROL_DATA_INFORMATION_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_CONTROL_DATA_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_CONTROL_DATA_INFORMATION",
	.tp_getset = NULL,
	.tp_methods = py_netr_CONTROL_DATA_INFORMATION_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_CONTROL_DATA_INFORMATION_new,
};

static PyObject *py_import_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, union netr_ChangeLogObject *in)
{
	PyObject *ret;

	switch (level) {
		case NETR_CHANGELOG_SID_INCLUDED:
			ret = pytalloc_reference_ex(dom_sid_Type, mem_ctx, &in->object_sid);
			return ret;

		case NETR_CHANGELOG_NAME_INCLUDED:
			ret = PyString_FromStringOrNULL(in->object_name);
			return ret;

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

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

static union netr_ChangeLogObject *py_export_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_ChangeLogObject *ret = talloc_zero(mem_ctx, union netr_ChangeLogObject);
	switch (level) {
		case NETR_CHANGELOG_SID_INCLUDED:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->object_sid");
				talloc_free(ret); return NULL;
			}
			PY_CHECK_TYPE(dom_sid_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->object_sid = *(struct dom_sid *)pytalloc_get_ptr(in);
			break;

		case NETR_CHANGELOG_NAME_INCLUDED:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->object_name");
				talloc_free(ret); return NULL;
			}
			{
				const char *test_str;
				const char *talloc_str;
				PyObject *unicode = NULL;
				if (PyUnicode_Check(in)) {
					unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
					if (unicode == NULL) {
						talloc_free(ret); return NULL;
					}
					test_str = PyBytes_AS_STRING(unicode);
				} else if (PyBytes_Check(in)) {
					test_str = PyBytes_AS_STRING(in);
				} else {
					PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
					talloc_free(ret); return NULL;
				}
				talloc_str = talloc_strdup(mem_ctx, test_str);
				if (unicode != NULL) {
					Py_DECREF(unicode);
				}
				if (talloc_str == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->object_name = talloc_str;
			}
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_ChangeLogObject_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_ChangeLogObject *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_ChangeLogObject *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_ChangeLogObject!");
		return NULL;
	}

	return py_import_netr_ChangeLogObject(mem_ctx, level, in);
}

static PyObject *py_netr_ChangeLogObject_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_ChangeLogObject *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_ChangeLogObject(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_ChangeLogObject_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_ChangeLogObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_ChangeLogObject_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ChangeLogObject",
	.tp_getset = NULL,
	.tp_methods = py_netr_ChangeLogObject_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ChangeLogObject_new,
};


static PyObject *py_netr_ChangeLogEntry_get_serial_number1(PyObject *obj, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
	PyObject *py_serial_number1;
	py_serial_number1 = PyLong_FromUnsignedLongLong((uint32_t)(object->serial_number1));
	return py_serial_number1;
}

static int py_netr_ChangeLogEntry_set_serial_number1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->serial_number1");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number1));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->serial_number1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChangeLogEntry_get_serial_number2(PyObject *obj, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
	PyObject *py_serial_number2;
	py_serial_number2 = PyLong_FromUnsignedLongLong((uint32_t)(object->serial_number2));
	return py_serial_number2;
}

static int py_netr_ChangeLogEntry_set_serial_number2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->serial_number2");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number2));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->serial_number2 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChangeLogEntry_get_object_rid(PyObject *obj, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
	PyObject *py_object_rid;
	py_object_rid = PyLong_FromUnsignedLongLong((uint32_t)(object->object_rid));
	return py_object_rid;
}

static int py_netr_ChangeLogEntry_set_object_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->object_rid");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->object_rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChangeLogEntry_get_flags(PyObject *obj, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromLong((uint16_t)(object->flags));
	return py_flags;
}

static int py_netr_ChangeLogEntry_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChangeLogEntry_get_db_index(PyObject *obj, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
	PyObject *py_db_index;
	py_db_index = PyLong_FromLong((uint16_t)(object->db_index));
	return py_db_index;
}

static int py_netr_ChangeLogEntry_set_db_index(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->db_index");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_index));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->db_index = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChangeLogEntry_get_delta_type(PyObject *obj, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_type;
	py_delta_type = PyLong_FromLong((uint16_t)(object->delta_type));
	return py_delta_type;
}

static int py_netr_ChangeLogEntry_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->delta_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->delta_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ChangeLogEntry_get_object(PyObject *obj, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(obj);
	PyObject *py_object;
	py_object = pyrpc_import_union(&netr_ChangeLogObject_Type, pytalloc_get_mem_ctx(obj), object->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED), &object->object, "union netr_ChangeLogObject");
	if (py_object == NULL) {
		return NULL;
	}
	return py_object;
}

static int py_netr_ChangeLogEntry_set_object(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->object");
		return -1;
	}
	{
		union netr_ChangeLogObject *object_switch_0;
		object_switch_0 = (union netr_ChangeLogObject *)pyrpc_export_union(&netr_ChangeLogObject_Type, pytalloc_get_mem_ctx(py_obj), object->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED), value, "union netr_ChangeLogObject");
		if (object_switch_0 == NULL) {
			return -1;
		}
		object->object = *object_switch_0;
	}
	return 0;
}

static PyGetSetDef py_netr_ChangeLogEntry_getsetters[] = {
	{
		.name = discard_const_p(char, "serial_number1"),
		.get = py_netr_ChangeLogEntry_get_serial_number1,
		.set = py_netr_ChangeLogEntry_set_serial_number1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "serial_number2"),
		.get = py_netr_ChangeLogEntry_get_serial_number2,
		.set = py_netr_ChangeLogEntry_set_serial_number2,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "object_rid"),
		.get = py_netr_ChangeLogEntry_get_object_rid,
		.set = py_netr_ChangeLogEntry_set_object_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "flags"),
		.get = py_netr_ChangeLogEntry_get_flags,
		.set = py_netr_ChangeLogEntry_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogFlags")
	},
	{
		.name = discard_const_p(char, "db_index"),
		.get = py_netr_ChangeLogEntry_get_db_index,
		.set = py_netr_ChangeLogEntry_set_db_index,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID8Bit")
	},
	{
		.name = discard_const_p(char, "delta_type"),
		.get = py_netr_ChangeLogEntry_get_delta_type,
		.set = py_netr_ChangeLogEntry_set_delta_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum8Bit")
	},
	{
		.name = discard_const_p(char, "object"),
		.get = py_netr_ChangeLogEntry_get_object,
		.set = py_netr_ChangeLogEntry_set_object,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogObject")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_ChangeLogEntry_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_ChangeLogEntry_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_ChangeLogEntry);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ChangeLogEntry);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_ChangeLogEntry_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_ChangeLogEntry *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_ChangeLogEntry, "netr_ChangeLogEntry", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_ChangeLogEntry, "netr_ChangeLogEntry", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_ChangeLogEntry_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_ChangeLogEntry_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogEntry_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogEntry_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ChangeLogEntry_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ChangeLogEntry",
	.tp_getset = py_netr_ChangeLogEntry_getsetters,
	.tp_methods = py_netr_ChangeLogEntry_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ChangeLogEntry_new,
};


static PyObject *py_netr_Blob_get_length(PyObject *obj, void *closure)
{
	struct netr_Blob *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
	return py_length;
}

static int py_netr_Blob_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_Blob *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_Blob_get_data(PyObject *obj, void *closure)
{
	struct netr_Blob *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		Py_RETURN_NONE;
	}
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyList_New(object->length);
		if (py_data == NULL) {
			return NULL;
		}
		{
			int data_cntr_1;
			for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
				PyObject *py_data_1;
				py_data_1 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_1]));
				PyList_SetItem(py_data, data_cntr_1, py_data_1);
			}
		}
	}
	return py_data;
}

static int py_netr_Blob_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_Blob *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
		return -1;
	}
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int data_cntr_1;
			object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
			if (!object->data) { return -1; }
			talloc_set_name_const(object->data, "ARRAY: object->data");
			for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
				if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->data)[data_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_Blob_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_Blob_get_length,
		.set = py_netr_Blob_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "data"),
		.get = py_netr_Blob_get_data,
		.set = py_netr_Blob_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_Blob_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_Blob",
	.tp_getset = py_netr_Blob_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_Blob_new,
};


static PyObject *py_netr_DsRGetDCNameInfo_get_dc_unc(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dc_unc;
	if (object->dc_unc == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dc_unc == NULL) {
		py_dc_unc = Py_None;
		Py_INCREF(py_dc_unc);
	} else {
		if (object->dc_unc == NULL) {
			py_dc_unc = Py_None;
			Py_INCREF(py_dc_unc);
		} else {
			py_dc_unc = PyUnicode_Decode(object->dc_unc, strlen(object->dc_unc), "utf-8", "ignore");
		}
	}
	return py_dc_unc;
}

static int py_netr_DsRGetDCNameInfo_set_dc_unc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_unc");
		return -1;
	}
	if (value == Py_None) {
		object->dc_unc = NULL;
	} else {
		object->dc_unc = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dc_unc = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dc_address;
	if (object->dc_address == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dc_address == NULL) {
		py_dc_address = Py_None;
		Py_INCREF(py_dc_address);
	} else {
		if (object->dc_address == NULL) {
			py_dc_address = Py_None;
			Py_INCREF(py_dc_address);
		} else {
			py_dc_address = PyUnicode_Decode(object->dc_address, strlen(object->dc_address), "utf-8", "ignore");
		}
	}
	return py_dc_address;
}

static int py_netr_DsRGetDCNameInfo_set_dc_address(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_address");
		return -1;
	}
	if (value == Py_None) {
		object->dc_address = NULL;
	} else {
		object->dc_address = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dc_address = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address_type(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dc_address_type;
	py_dc_address_type = PyLong_FromUnsignedLongLong((uint32_t)(object->dc_address_type));
	return py_dc_address_type;
}

static int py_netr_DsRGetDCNameInfo_set_dc_address_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_address_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_address_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dc_address_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_domain_guid(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_guid;
	py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
	return py_domain_guid;
}

static int py_netr_DsRGetDCNameInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_guid");
		return -1;
	}
	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->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	if (object->domain_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->domain_name == NULL) {
		py_domain_name = Py_None;
		Py_INCREF(py_domain_name);
	} else {
		if (object->domain_name == NULL) {
			py_domain_name = Py_None;
			Py_INCREF(py_domain_name);
		} else {
			py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
		}
	}
	return py_domain_name;
}

static int py_netr_DsRGetDCNameInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_name");
		return -1;
	}
	if (value == Py_None) {
		object->domain_name = NULL;
	} else {
		object->domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->domain_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_forest_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_forest_name;
	if (object->forest_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->forest_name == NULL) {
		py_forest_name = Py_None;
		Py_INCREF(py_forest_name);
	} else {
		if (object->forest_name == NULL) {
			py_forest_name = Py_None;
			Py_INCREF(py_forest_name);
		} else {
			py_forest_name = PyUnicode_Decode(object->forest_name, strlen(object->forest_name), "utf-8", "ignore");
		}
	}
	return py_forest_name;
}

static int py_netr_DsRGetDCNameInfo_set_forest_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->forest_name");
		return -1;
	}
	if (value == Py_None) {
		object->forest_name = NULL;
	} else {
		object->forest_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->forest_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_dc_flags(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dc_flags;
	py_dc_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->dc_flags));
	return py_dc_flags;
}

static int py_netr_DsRGetDCNameInfo_set_dc_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dc_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_dc_site_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dc_site_name;
	if (object->dc_site_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dc_site_name == NULL) {
		py_dc_site_name = Py_None;
		Py_INCREF(py_dc_site_name);
	} else {
		if (object->dc_site_name == NULL) {
			py_dc_site_name = Py_None;
			Py_INCREF(py_dc_site_name);
		} else {
			py_dc_site_name = PyUnicode_Decode(object->dc_site_name, strlen(object->dc_site_name), "utf-8", "ignore");
		}
	}
	return py_dc_site_name;
}

static int py_netr_DsRGetDCNameInfo_set_dc_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dc_site_name");
		return -1;
	}
	if (value == Py_None) {
		object->dc_site_name = NULL;
	} else {
		object->dc_site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dc_site_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameInfo_get_client_site_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_client_site_name;
	if (object->client_site_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->client_site_name == NULL) {
		py_client_site_name = Py_None;
		Py_INCREF(py_client_site_name);
	} else {
		if (object->client_site_name == NULL) {
			py_client_site_name = Py_None;
			Py_INCREF(py_client_site_name);
		} else {
			py_client_site_name = PyUnicode_Decode(object->client_site_name, strlen(object->client_site_name), "utf-8", "ignore");
		}
	}
	return py_client_site_name;
}

static int py_netr_DsRGetDCNameInfo_set_client_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->client_site_name");
		return -1;
	}
	if (value == Py_None) {
		object->client_site_name = NULL;
	} else {
		object->client_site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->client_site_name = talloc_str;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DsRGetDCNameInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "dc_unc"),
		.get = py_netr_DsRGetDCNameInfo_get_dc_unc,
		.set = py_netr_DsRGetDCNameInfo_set_dc_unc,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dc_address"),
		.get = py_netr_DsRGetDCNameInfo_get_dc_address,
		.set = py_netr_DsRGetDCNameInfo_set_dc_address,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dc_address_type"),
		.get = py_netr_DsRGetDCNameInfo_get_dc_address_type,
		.set = py_netr_DsRGetDCNameInfo_set_dc_address_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo_AddressType")
	},
	{
		.name = discard_const_p(char, "domain_guid"),
		.get = py_netr_DsRGetDCNameInfo_get_domain_guid,
		.set = py_netr_DsRGetDCNameInfo_set_domain_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "domain_name"),
		.get = py_netr_DsRGetDCNameInfo_get_domain_name,
		.set = py_netr_DsRGetDCNameInfo_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "forest_name"),
		.get = py_netr_DsRGetDCNameInfo_get_forest_name,
		.set = py_netr_DsRGetDCNameInfo_set_forest_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dc_flags"),
		.get = py_netr_DsRGetDCNameInfo_get_dc_flags,
		.set = py_netr_DsRGetDCNameInfo_set_dc_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type nbt_server_type")
	},
	{
		.name = discard_const_p(char, "dc_site_name"),
		.get = py_netr_DsRGetDCNameInfo_get_dc_site_name,
		.set = py_netr_DsRGetDCNameInfo_set_dc_site_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "client_site_name"),
		.get = py_netr_DsRGetDCNameInfo_get_client_site_name,
		.set = py_netr_DsRGetDCNameInfo_set_client_site_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_DsRGetDCNameInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameInfo);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_DsRGetDCNameInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_DsRGetDCNameInfo);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameInfo);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRGetDCNameInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_DsRGetDCNameInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DsRGetDCNameInfo, "netr_DsRGetDCNameInfo", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DsRGetDCNameInfo, "netr_DsRGetDCNameInfo", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_DsRGetDCNameInfo_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_DsRGetDCNameInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameInfo_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameInfo_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRGetDCNameInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRGetDCNameInfo",
	.tp_getset = py_netr_DsRGetDCNameInfo_getsetters,
	.tp_methods = py_netr_DsRGetDCNameInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRGetDCNameInfo_new,
};

static PyObject *py_import_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, union netr_Capabilities *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->server_capabilities));
			return ret;

		case 2:
			ret = PyLong_FromUnsignedLongLong((uint32_t)(in->requested_flags));
			return ret;

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

static union netr_Capabilities *py_export_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_Capabilities *ret = talloc_zero(mem_ctx, union netr_Capabilities);
	switch (level) {
		case 1:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->server_capabilities");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->server_capabilities));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->server_capabilities = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

		case 2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->requested_flags");
				talloc_free(ret); return NULL;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->requested_flags));
				if (PyLong_Check(in)) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(in);
					if (PyErr_Occurred() != NULL) {
						talloc_free(ret); return NULL;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						talloc_free(ret); return NULL;
					}
					ret->requested_flags = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					talloc_free(ret); return NULL;
				}
			}
			break;

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

	return ret;
}

static PyObject *py_netr_Capabilities_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_Capabilities *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_Capabilities *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Capabilities!");
		return NULL;
	}

	return py_import_netr_Capabilities(mem_ctx, level, in);
}

static PyObject *py_netr_Capabilities_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_Capabilities *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_Capabilities(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_Capabilities_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_Capabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_Capabilities_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_Capabilities",
	.tp_getset = NULL,
	.tp_methods = py_netr_Capabilities_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_Capabilities_new,
};


static PyObject *py_netr_LsaPolicyInformation_get_policy_size(PyObject *obj, void *closure)
{
	struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_policy_size;
	py_policy_size = PyLong_FromUnsignedLongLong((uint32_t)(object->policy_size));
	return py_policy_size;
}

static int py_netr_LsaPolicyInformation_set_policy_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->policy_size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->policy_size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->policy_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LsaPolicyInformation_get_policy(PyObject *obj, void *closure)
{
	struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_policy;
	if (object->policy == NULL) {
		Py_RETURN_NONE;
	}
	if (object->policy == NULL) {
		py_policy = Py_None;
		Py_INCREF(py_policy);
	} else {
		py_policy = PyList_New(object->policy_size);
		if (py_policy == NULL) {
			return NULL;
		}
		{
			int policy_cntr_1;
			for (policy_cntr_1 = 0; policy_cntr_1 < (object->policy_size); policy_cntr_1++) {
				PyObject *py_policy_1;
				py_policy_1 = PyLong_FromLong((uint16_t)((object->policy)[policy_cntr_1]));
				PyList_SetItem(py_policy, policy_cntr_1, py_policy_1);
			}
		}
	}
	return py_policy;
}

static int py_netr_LsaPolicyInformation_set_policy(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LsaPolicyInformation *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->policy));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->policy");
		return -1;
	}
	if (value == Py_None) {
		object->policy = NULL;
	} else {
		object->policy = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int policy_cntr_1;
			object->policy = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->policy, PyList_GET_SIZE(value));
			if (!object->policy) { return -1; }
			talloc_set_name_const(object->policy, "ARRAY: object->policy");
			for (policy_cntr_1 = 0; policy_cntr_1 < PyList_GET_SIZE(value); policy_cntr_1++) {
				if (PyList_GET_ITEM(value, policy_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->policy)[policy_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->policy)[policy_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, policy_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, policy_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->policy)[policy_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_LsaPolicyInformation_getsetters[] = {
	{
		.name = discard_const_p(char, "policy_size"),
		.get = py_netr_LsaPolicyInformation_get_policy_size,
		.set = py_netr_LsaPolicyInformation_set_policy_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "policy"),
		.get = py_netr_LsaPolicyInformation_get_policy,
		.set = py_netr_LsaPolicyInformation_set_policy,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_LsaPolicyInformation_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LsaPolicyInformation",
	.tp_getset = py_netr_LsaPolicyInformation_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LsaPolicyInformation_new,
};


static PyObject *py_netr_OsVersionInfoEx_get_OSVersionInfoSize(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_OSVersionInfoSize;
	py_OSVersionInfoSize = PyLong_FromUnsignedLongLong((uint32_t)(object->OSVersionInfoSize));
	return py_OSVersionInfoSize;
}

static int py_netr_OsVersionInfoEx_set_OSVersionInfoSize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->OSVersionInfoSize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->OSVersionInfoSize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->OSVersionInfoSize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_MajorVersion(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_MajorVersion;
	py_MajorVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->MajorVersion));
	return py_MajorVersion;
}

static int py_netr_OsVersionInfoEx_set_MajorVersion(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->MajorVersion");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MajorVersion));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->MajorVersion = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_MinorVersion(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_MinorVersion;
	py_MinorVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->MinorVersion));
	return py_MinorVersion;
}

static int py_netr_OsVersionInfoEx_set_MinorVersion(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->MinorVersion");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MinorVersion));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->MinorVersion = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_BuildNumber(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_BuildNumber;
	py_BuildNumber = PyLong_FromUnsignedLongLong((uint32_t)(object->BuildNumber));
	return py_BuildNumber;
}

static int py_netr_OsVersionInfoEx_set_BuildNumber(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->BuildNumber");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->BuildNumber));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->BuildNumber = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_PlatformId(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_PlatformId;
	py_PlatformId = PyLong_FromUnsignedLongLong((uint32_t)(object->PlatformId));
	return py_PlatformId;
}

static int py_netr_OsVersionInfoEx_set_PlatformId(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->PlatformId");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PlatformId));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->PlatformId = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_CSDVersion(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_CSDVersion;
	py_CSDVersion = PyString_FromStringOrNULL(object->CSDVersion);
	return py_CSDVersion;
}

static int py_netr_OsVersionInfoEx_set_CSDVersion(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->CSDVersion");
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->CSDVersion = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMajor(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_ServicePackMajor;
	py_ServicePackMajor = PyLong_FromLong((uint16_t)(object->ServicePackMajor));
	return py_ServicePackMajor;
}

static int py_netr_OsVersionInfoEx_set_ServicePackMajor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ServicePackMajor");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMajor));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->ServicePackMajor = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMinor(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_ServicePackMinor;
	py_ServicePackMinor = PyLong_FromLong((uint16_t)(object->ServicePackMinor));
	return py_ServicePackMinor;
}

static int py_netr_OsVersionInfoEx_set_ServicePackMinor(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ServicePackMinor");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMinor));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->ServicePackMinor = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_SuiteMask(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_SuiteMask;
	py_SuiteMask = PyLong_FromLong((uint16_t)(object->SuiteMask));
	return py_SuiteMask;
}

static int py_netr_OsVersionInfoEx_set_SuiteMask(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->SuiteMask");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SuiteMask));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->SuiteMask = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_ProductType(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_ProductType;
	py_ProductType = PyLong_FromLong((uint16_t)(object->ProductType));
	return py_ProductType;
}

static int py_netr_OsVersionInfoEx_set_ProductType(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ProductType");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ProductType));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->ProductType = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionInfoEx_get_Reserved(PyObject *obj, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(obj);
	PyObject *py_Reserved;
	py_Reserved = PyLong_FromLong((uint16_t)(object->Reserved));
	return py_Reserved;
}

static int py_netr_OsVersionInfoEx_set_Reserved(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionInfoEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Reserved");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->Reserved = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_OsVersionInfoEx_getsetters[] = {
	{
		.name = discard_const_p(char, "OSVersionInfoSize"),
		.get = py_netr_OsVersionInfoEx_get_OSVersionInfoSize,
		.set = py_netr_OsVersionInfoEx_set_OSVersionInfoSize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "MajorVersion"),
		.get = py_netr_OsVersionInfoEx_get_MajorVersion,
		.set = py_netr_OsVersionInfoEx_set_MajorVersion,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "MinorVersion"),
		.get = py_netr_OsVersionInfoEx_get_MinorVersion,
		.set = py_netr_OsVersionInfoEx_set_MinorVersion,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "BuildNumber"),
		.get = py_netr_OsVersionInfoEx_get_BuildNumber,
		.set = py_netr_OsVersionInfoEx_set_BuildNumber,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "PlatformId"),
		.get = py_netr_OsVersionInfoEx_get_PlatformId,
		.set = py_netr_OsVersionInfoEx_set_PlatformId,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "CSDVersion"),
		.get = py_netr_OsVersionInfoEx_get_CSDVersion,
		.set = py_netr_OsVersionInfoEx_set_CSDVersion,
		.doc = discard_const_p(char, "PIDL-generated element of base type string")
	},
	{
		.name = discard_const_p(char, "ServicePackMajor"),
		.get = py_netr_OsVersionInfoEx_get_ServicePackMajor,
		.set = py_netr_OsVersionInfoEx_set_ServicePackMajor,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "ServicePackMinor"),
		.get = py_netr_OsVersionInfoEx_get_ServicePackMinor,
		.set = py_netr_OsVersionInfoEx_set_ServicePackMinor,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "SuiteMask"),
		.get = py_netr_OsVersionInfoEx_get_SuiteMask,
		.set = py_netr_OsVersionInfoEx_set_SuiteMask,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SuiteMask")
	},
	{
		.name = discard_const_p(char, "ProductType"),
		.get = py_netr_OsVersionInfoEx_get_ProductType,
		.set = py_netr_OsVersionInfoEx_set_ProductType,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_ProductType")
	},
	{
		.name = discard_const_p(char, "Reserved"),
		.get = py_netr_OsVersionInfoEx_get_Reserved,
		.set = py_netr_OsVersionInfoEx_set_Reserved,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_OsVersionInfoEx_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_OsVersionInfoEx",
	.tp_getset = py_netr_OsVersionInfoEx_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_OsVersionInfoEx_new,
};


static PyObject *py_netr_OsVersion_get_length(PyObject *obj, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
	return py_length;
}

static int py_netr_OsVersion_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersion_get_dummy(PyObject *obj, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy;
	py_dummy = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy));
	return py_dummy;
}

static int py_netr_OsVersion_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersion_get_size(PyObject *obj, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
	return py_size;
}

static int py_netr_OsVersion_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersion_get_os(PyObject *obj, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(obj);
	PyObject *py_os;
	py_os = pytalloc_reference_ex(&netr_OsVersionInfoEx_Type, pytalloc_get_mem_ctx(obj), &object->os);
	return py_os;
}

static int py_netr_OsVersion_set_os(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersion *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os");
		return -1;
	}
	PY_CHECK_TYPE(&netr_OsVersionInfoEx_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->os = *(struct netr_OsVersionInfoEx *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_OsVersion_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_OsVersion_get_length,
		.set = py_netr_OsVersion_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
	},
	{
		.name = discard_const_p(char, "dummy"),
		.get = py_netr_OsVersion_get_dummy,
		.set = py_netr_OsVersion_set_dummy,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
	},
	{
		.name = discard_const_p(char, "size"),
		.get = py_netr_OsVersion_get_size,
		.set = py_netr_OsVersion_set_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
	},
	{
		.name = discard_const_p(char, "os"),
		.get = py_netr_OsVersion_get_os,
		.set = py_netr_OsVersion_set_os,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionInfoEx")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_OsVersion_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_OsVersion",
	.tp_getset = py_netr_OsVersion_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_OsVersion_new,
};


static PyObject *py_netr_OsVersionContainer_get_length(PyObject *obj, void *closure)
{
	struct netr_OsVersionContainer *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromLong((uint16_t)(object->length));
	return py_length;
}

static int py_netr_OsVersionContainer_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionContainer *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionContainer_get_size(PyObject *obj, void *closure)
{
	struct netr_OsVersionContainer *object = pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLong((uint16_t)(object->size));
	return py_size;
}

static int py_netr_OsVersionContainer_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionContainer *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OsVersionContainer_get_os(PyObject *obj, void *closure)
{
	struct netr_OsVersionContainer *object = pytalloc_get_ptr(obj);
	PyObject *py_os;
	if (object->os == NULL) {
		Py_RETURN_NONE;
	}
	if (object->os == NULL) {
		py_os = Py_None;
		Py_INCREF(py_os);
	} else {
		py_os = pytalloc_reference_ex(&netr_OsVersion_Type, object->os, object->os);
	}
	return py_os;
}

static int py_netr_OsVersionContainer_set_os(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OsVersionContainer *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->os));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os");
		return -1;
	}
	if (value == Py_None) {
		object->os = NULL;
	} else {
		object->os = NULL;
		PY_CHECK_TYPE(&netr_OsVersion_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->os = (struct netr_OsVersion *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_netr_OsVersionContainer_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_OsVersionContainer_get_length,
		.set = py_netr_OsVersionContainer_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "size"),
		.get = py_netr_OsVersionContainer_get_size,
		.set = py_netr_OsVersionContainer_set_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "os"),
		.get = py_netr_OsVersionContainer_get_os,
		.set = py_netr_OsVersionContainer_set_os,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersion")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_OsVersionContainer_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_OsVersionContainer",
	.tp_getset = py_netr_OsVersionContainer_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_OsVersionContainer_new,
};


static PyObject *py_netr_WorkstationInformation_get_lsa_policy(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_lsa_policy;
	py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
	return py_lsa_policy;
}

static int py_netr_WorkstationInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lsa_policy");
		return -1;
	}
	PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dns_hostname(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_hostname;
	if (object->dns_hostname == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dns_hostname == NULL) {
		py_dns_hostname = Py_None;
		Py_INCREF(py_dns_hostname);
	} else {
		if (object->dns_hostname == NULL) {
			py_dns_hostname = Py_None;
			Py_INCREF(py_dns_hostname);
		} else {
			py_dns_hostname = PyUnicode_Decode(object->dns_hostname, strlen(object->dns_hostname), "utf-8", "ignore");
		}
	}
	return py_dns_hostname;
}

static int py_netr_WorkstationInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_hostname");
		return -1;
	}
	if (value == Py_None) {
		object->dns_hostname = NULL;
	} else {
		object->dns_hostname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dns_hostname = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_sitename(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_sitename;
	if (object->sitename == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sitename == NULL) {
		py_sitename = Py_None;
		Py_INCREF(py_sitename);
	} else {
		if (object->sitename == NULL) {
			py_sitename = Py_None;
			Py_INCREF(py_sitename);
		} else {
			py_sitename = PyUnicode_Decode(object->sitename, strlen(object->sitename), "utf-8", "ignore");
		}
	}
	return py_sitename;
}

static int py_netr_WorkstationInformation_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sitename");
		return -1;
	}
	if (value == Py_None) {
		object->sitename = NULL;
	} else {
		object->sitename = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->sitename = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy1(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy1;
	if (object->dummy1 == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dummy1 == NULL) {
		py_dummy1 = Py_None;
		Py_INCREF(py_dummy1);
	} else {
		if (object->dummy1 == NULL) {
			py_dummy1 = Py_None;
			Py_INCREF(py_dummy1);
		} else {
			py_dummy1 = PyUnicode_Decode(object->dummy1, strlen(object->dummy1), "utf-8", "ignore");
		}
	}
	return py_dummy1;
}

static int py_netr_WorkstationInformation_set_dummy1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy1");
		return -1;
	}
	if (value == Py_None) {
		object->dummy1 = NULL;
	} else {
		object->dummy1 = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dummy1 = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy2(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy2;
	if (object->dummy2 == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dummy2 == NULL) {
		py_dummy2 = Py_None;
		Py_INCREF(py_dummy2);
	} else {
		if (object->dummy2 == NULL) {
			py_dummy2 = Py_None;
			Py_INCREF(py_dummy2);
		} else {
			py_dummy2 = PyUnicode_Decode(object->dummy2, strlen(object->dummy2), "utf-8", "ignore");
		}
	}
	return py_dummy2;
}

static int py_netr_WorkstationInformation_set_dummy2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy2");
		return -1;
	}
	if (value == Py_None) {
		object->dummy2 = NULL;
	} else {
		object->dummy2 = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dummy2 = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy3(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy3;
	if (object->dummy3 == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dummy3 == NULL) {
		py_dummy3 = Py_None;
		Py_INCREF(py_dummy3);
	} else {
		if (object->dummy3 == NULL) {
			py_dummy3 = Py_None;
			Py_INCREF(py_dummy3);
		} else {
			py_dummy3 = PyUnicode_Decode(object->dummy3, strlen(object->dummy3), "utf-8", "ignore");
		}
	}
	return py_dummy3;
}

static int py_netr_WorkstationInformation_set_dummy3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy3");
		return -1;
	}
	if (value == Py_None) {
		object->dummy3 = NULL;
	} else {
		object->dummy3 = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dummy3 = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy4(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy4;
	if (object->dummy4 == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dummy4 == NULL) {
		py_dummy4 = Py_None;
		Py_INCREF(py_dummy4);
	} else {
		if (object->dummy4 == NULL) {
			py_dummy4 = Py_None;
			Py_INCREF(py_dummy4);
		} else {
			py_dummy4 = PyUnicode_Decode(object->dummy4, strlen(object->dummy4), "utf-8", "ignore");
		}
	}
	return py_dummy4;
}

static int py_netr_WorkstationInformation_set_dummy4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy4");
		return -1;
	}
	if (value == Py_None) {
		object->dummy4 = NULL;
	} else {
		object->dummy4 = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dummy4 = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_os_version(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_os_version;
	py_os_version = pytalloc_reference_ex(&netr_OsVersionContainer_Type, pytalloc_get_mem_ctx(obj), &object->os_version);
	return py_os_version;
}

static int py_netr_WorkstationInformation_set_os_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os_version");
		return -1;
	}
	PY_CHECK_TYPE(&netr_OsVersionContainer_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->os_version = *(struct netr_OsVersionContainer *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_os_name(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_os_name;
	py_os_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->os_name);
	return py_os_name;
}

static int py_netr_WorkstationInformation_set_os_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->os_name");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->os_name = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy_string3(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string3;
	py_dummy_string3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
	return py_dummy_string3;
}

static int py_netr_WorkstationInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string3 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy_string4(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string4;
	py_dummy_string4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
	return py_dummy_string4;
}

static int py_netr_WorkstationInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string4 = *(struct lsa_String *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_workstation_flags(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_workstation_flags;
	py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->workstation_flags));
	return py_workstation_flags;
}

static int py_netr_WorkstationInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstation_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->workstation_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_supported_enc_types(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_supported_enc_types;
	py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)(object->supported_enc_types));
	return py_supported_enc_types;
}

static int py_netr_WorkstationInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->supported_enc_types");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->supported_enc_types = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy_long3(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long3;
	py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long3));
	return py_dummy_long3;
}

static int py_netr_WorkstationInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long3");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long3 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_WorkstationInformation_get_dummy_long4(PyObject *obj, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long4;
	py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long4));
	return py_dummy_long4;
}

static int py_netr_WorkstationInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_WorkstationInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long4");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long4 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_WorkstationInformation_getsetters[] = {
	{
		.name = discard_const_p(char, "lsa_policy"),
		.get = py_netr_WorkstationInformation_get_lsa_policy,
		.set = py_netr_WorkstationInformation_set_lsa_policy,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
	},
	{
		.name = discard_const_p(char, "dns_hostname"),
		.get = py_netr_WorkstationInformation_get_dns_hostname,
		.set = py_netr_WorkstationInformation_set_dns_hostname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "sitename"),
		.get = py_netr_WorkstationInformation_get_sitename,
		.set = py_netr_WorkstationInformation_set_sitename,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dummy1"),
		.get = py_netr_WorkstationInformation_get_dummy1,
		.set = py_netr_WorkstationInformation_set_dummy1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dummy2"),
		.get = py_netr_WorkstationInformation_get_dummy2,
		.set = py_netr_WorkstationInformation_set_dummy2,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dummy3"),
		.get = py_netr_WorkstationInformation_get_dummy3,
		.set = py_netr_WorkstationInformation_set_dummy3,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dummy4"),
		.get = py_netr_WorkstationInformation_get_dummy4,
		.set = py_netr_WorkstationInformation_set_dummy4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "os_version"),
		.get = py_netr_WorkstationInformation_get_os_version,
		.set = py_netr_WorkstationInformation_set_os_version,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionContainer")
	},
	{
		.name = discard_const_p(char, "os_name"),
		.get = py_netr_WorkstationInformation_get_os_name,
		.set = py_netr_WorkstationInformation_set_os_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "dummy_string3"),
		.get = py_netr_WorkstationInformation_get_dummy_string3,
		.set = py_netr_WorkstationInformation_set_dummy_string3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "dummy_string4"),
		.get = py_netr_WorkstationInformation_get_dummy_string4,
		.set = py_netr_WorkstationInformation_set_dummy_string4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "workstation_flags"),
		.get = py_netr_WorkstationInformation_get_workstation_flags,
		.set = py_netr_WorkstationInformation_set_workstation_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
	},
	{
		.name = discard_const_p(char, "supported_enc_types"),
		.get = py_netr_WorkstationInformation_get_supported_enc_types,
		.set = py_netr_WorkstationInformation_set_supported_enc_types,
		.doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
	},
	{
		.name = discard_const_p(char, "dummy_long3"),
		.get = py_netr_WorkstationInformation_get_dummy_long3,
		.set = py_netr_WorkstationInformation_set_dummy_long3,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "dummy_long4"),
		.get = py_netr_WorkstationInformation_get_dummy_long4,
		.set = py_netr_WorkstationInformation_set_dummy_long4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_WorkstationInformation_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_WorkstationInformation",
	.tp_getset = py_netr_WorkstationInformation_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_WorkstationInformation_new,
};

static PyObject *py_import_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, union netr_WorkstationInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			if (in->workstation_info == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->workstation_info, in->workstation_info);
			}
			return ret;

		case 2:
			if (in->lsa_policy_info == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
			}
			return ret;

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

static union netr_WorkstationInfo *py_export_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_WorkstationInfo *ret = talloc_zero(mem_ctx, union netr_WorkstationInfo);
	switch (level) {
		case 1:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->workstation_info");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->workstation_info = NULL;
			} else {
				ret->workstation_info = NULL;
				PY_CHECK_TYPE(&netr_WorkstationInformation_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->workstation_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->lsa_policy_info");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->lsa_policy_info = NULL;
			} else {
				ret->lsa_policy_info = NULL;
				PY_CHECK_TYPE(&netr_WorkstationInformation_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->lsa_policy_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
			}
			break;

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

	return ret;
}

static PyObject *py_netr_WorkstationInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_WorkstationInfo *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_WorkstationInfo *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_WorkstationInfo!");
		return NULL;
	}

	return py_import_netr_WorkstationInfo(mem_ctx, level, in);
}

static PyObject *py_netr_WorkstationInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_WorkstationInfo *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_WorkstationInfo(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_WorkstationInfo_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_WorkstationInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_WorkstationInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_WorkstationInfo",
	.tp_getset = NULL,
	.tp_methods = py_netr_WorkstationInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_WorkstationInfo_new,
};


static PyObject *py_netr_trust_extension_info_get_flags(PyObject *obj, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
	return py_flags;
}

static int py_netr_trust_extension_info_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_info_get_parent_index(PyObject *obj, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
	PyObject *py_parent_index;
	py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)(object->parent_index));
	return py_parent_index;
}

static int py_netr_trust_extension_info_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parent_index");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->parent_index = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_info_get_trust_type(PyObject *obj, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_type;
	py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_type));
	return py_trust_type;
}

static int py_netr_trust_extension_info_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->trust_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_info_get_trust_attributes(PyObject *obj, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_attributes;
	py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_attributes));
	return py_trust_attributes;
}

static int py_netr_trust_extension_info_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension_info *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_attributes");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->trust_attributes = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_trust_extension_info_getsetters[] = {
	{
		.name = discard_const_p(char, "flags"),
		.get = py_netr_trust_extension_info_get_flags,
		.set = py_netr_trust_extension_info_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
	},
	{
		.name = discard_const_p(char, "parent_index"),
		.get = py_netr_trust_extension_info_get_parent_index,
		.set = py_netr_trust_extension_info_set_parent_index,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "trust_type"),
		.get = py_netr_trust_extension_info_get_trust_type,
		.set = py_netr_trust_extension_info_set_trust_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
	},
	{
		.name = discard_const_p(char, "trust_attributes"),
		.get = py_netr_trust_extension_info_get_trust_attributes,
		.set = py_netr_trust_extension_info_set_trust_attributes,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_trust_extension_info_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_trust_extension_info",
	.tp_getset = py_netr_trust_extension_info_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_trust_extension_info_new,
};


static PyObject *py_netr_trust_extension_get_length(PyObject *obj, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
	return py_length;
}

static int py_netr_trust_extension_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_get_dummy(PyObject *obj, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy;
	py_dummy = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy));
	return py_dummy;
}

static int py_netr_trust_extension_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_get_size(PyObject *obj, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
	return py_size;
}

static int py_netr_trust_extension_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_get_info(PyObject *obj, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	py_info = pytalloc_reference_ex(&netr_trust_extension_info_Type, pytalloc_get_mem_ctx(obj), &object->info);
	return py_info;
}

static int py_netr_trust_extension_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->info");
		return -1;
	}
	PY_CHECK_TYPE(&netr_trust_extension_info_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->info = *(struct netr_trust_extension_info *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_trust_extension_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_trust_extension_get_length,
		.set = py_netr_trust_extension_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
	},
	{
		.name = discard_const_p(char, "dummy"),
		.get = py_netr_trust_extension_get_dummy,
		.set = py_netr_trust_extension_set_dummy,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
	},
	{
		.name = discard_const_p(char, "size"),
		.get = py_netr_trust_extension_get_size,
		.set = py_netr_trust_extension_set_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
	},
	{
		.name = discard_const_p(char, "info"),
		.get = py_netr_trust_extension_get_info,
		.set = py_netr_trust_extension_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_info")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_trust_extension_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_trust_extension",
	.tp_getset = py_netr_trust_extension_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_trust_extension_new,
};


static PyObject *py_netr_trust_extension_container_get_length(PyObject *obj, void *closure)
{
	struct netr_trust_extension_container *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromLong((uint16_t)(object->length));
	return py_length;
}

static int py_netr_trust_extension_container_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension_container *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_container_get_size(PyObject *obj, void *closure)
{
	struct netr_trust_extension_container *object = pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLong((uint16_t)(object->size));
	return py_size;
}

static int py_netr_trust_extension_container_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension_container *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_trust_extension_container_get_info(PyObject *obj, void *closure)
{
	struct netr_trust_extension_container *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->info == NULL) {
		Py_RETURN_NONE;
	}
	if (object->info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_trust_extension_Type, object->info, object->info);
	}
	return py_info;
}

static int py_netr_trust_extension_container_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_trust_extension_container *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->info");
		return -1;
	}
	if (value == Py_None) {
		object->info = NULL;
	} else {
		object->info = NULL;
		PY_CHECK_TYPE(&netr_trust_extension_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->info = (struct netr_trust_extension *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyGetSetDef py_netr_trust_extension_container_getsetters[] = {
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_trust_extension_container_get_length,
		.set = py_netr_trust_extension_container_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "size"),
		.get = py_netr_trust_extension_container_get_size,
		.set = py_netr_trust_extension_container_set_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "info"),
		.get = py_netr_trust_extension_container_get_info,
		.set = py_netr_trust_extension_container_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_trust_extension_container_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_trust_extension_container",
	.tp_getset = py_netr_trust_extension_container_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_trust_extension_container_new,
};


static PyObject *py_netr_OneDomainInfo_get_domainname(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domainname;
	py_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->domainname);
	return py_domainname;
}

static int py_netr_OneDomainInfo_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domainname");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dns_domainname(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_domainname;
	py_dns_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
	return py_dns_domainname;
}

static int py_netr_OneDomainInfo_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domainname");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dns_domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dns_forestname(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_forestname;
	py_dns_forestname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_forestname);
	return py_dns_forestname;
}

static int py_netr_OneDomainInfo_set_dns_forestname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_forestname");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dns_forestname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_domain_guid(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_guid;
	py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
	return py_domain_guid;
}

static int py_netr_OneDomainInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_guid");
		return -1;
	}
	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->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_domain_sid(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_sid;
	if (object->domain_sid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->domain_sid == NULL) {
		py_domain_sid = Py_None;
		Py_INCREF(py_domain_sid);
	} else {
		py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
	}
	return py_domain_sid;
}

static int py_netr_OneDomainInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->domain_sid");
		return -1;
	}
	if (value == Py_None) {
		object->domain_sid = NULL;
	} else {
		object->domain_sid = NULL;
		PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_trust_extension(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_extension;
	py_trust_extension = pytalloc_reference_ex(&netr_trust_extension_container_Type, pytalloc_get_mem_ctx(obj), &object->trust_extension);
	return py_trust_extension;
}

static int py_netr_OneDomainInfo_set_trust_extension(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_extension");
		return -1;
	}
	PY_CHECK_TYPE(&netr_trust_extension_container_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->trust_extension = *(struct netr_trust_extension_container *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dummy_string2(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string2;
	py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
	return py_dummy_string2;
}

static int py_netr_OneDomainInfo_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dummy_string3(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string3;
	py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
	return py_dummy_string3;
}

static int py_netr_OneDomainInfo_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dummy_string4(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string4;
	py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
	return py_dummy_string4;
}

static int py_netr_OneDomainInfo_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dummy_long1(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long1;
	py_dummy_long1 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long1));
	return py_dummy_long1;
}

static int py_netr_OneDomainInfo_set_dummy_long1(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long1");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long1));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long1 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dummy_long2(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long2;
	py_dummy_long2 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long2));
	return py_dummy_long2;
}

static int py_netr_OneDomainInfo_set_dummy_long2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long2");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long2));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long2 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dummy_long3(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long3;
	py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long3));
	return py_dummy_long3;
}

static int py_netr_OneDomainInfo_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long3");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long3 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_OneDomainInfo_get_dummy_long4(PyObject *obj, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long4;
	py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long4));
	return py_dummy_long4;
}

static int py_netr_OneDomainInfo_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_OneDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long4");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long4 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_OneDomainInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "domainname"),
		.get = py_netr_OneDomainInfo_get_domainname,
		.set = py_netr_OneDomainInfo_set_domainname,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dns_domainname"),
		.get = py_netr_OneDomainInfo_get_dns_domainname,
		.set = py_netr_OneDomainInfo_set_dns_domainname,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dns_forestname"),
		.get = py_netr_OneDomainInfo_get_dns_forestname,
		.set = py_netr_OneDomainInfo_set_dns_forestname,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "domain_guid"),
		.get = py_netr_OneDomainInfo_get_domain_guid,
		.set = py_netr_OneDomainInfo_set_domain_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "domain_sid"),
		.get = py_netr_OneDomainInfo_get_domain_sid,
		.set = py_netr_OneDomainInfo_set_domain_sid,
		.doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
	},
	{
		.name = discard_const_p(char, "trust_extension"),
		.get = py_netr_OneDomainInfo_get_trust_extension,
		.set = py_netr_OneDomainInfo_set_trust_extension,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_container")
	},
	{
		.name = discard_const_p(char, "dummy_string2"),
		.get = py_netr_OneDomainInfo_get_dummy_string2,
		.set = py_netr_OneDomainInfo_set_dummy_string2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dummy_string3"),
		.get = py_netr_OneDomainInfo_get_dummy_string3,
		.set = py_netr_OneDomainInfo_set_dummy_string3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dummy_string4"),
		.get = py_netr_OneDomainInfo_get_dummy_string4,
		.set = py_netr_OneDomainInfo_set_dummy_string4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dummy_long1"),
		.get = py_netr_OneDomainInfo_get_dummy_long1,
		.set = py_netr_OneDomainInfo_set_dummy_long1,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "dummy_long2"),
		.get = py_netr_OneDomainInfo_get_dummy_long2,
		.set = py_netr_OneDomainInfo_set_dummy_long2,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "dummy_long3"),
		.get = py_netr_OneDomainInfo_get_dummy_long3,
		.set = py_netr_OneDomainInfo_set_dummy_long3,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "dummy_long4"),
		.get = py_netr_OneDomainInfo_get_dummy_long4,
		.set = py_netr_OneDomainInfo_set_dummy_long4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_OneDomainInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_OneDomainInfo",
	.tp_getset = py_netr_OneDomainInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_OneDomainInfo_new,
};


static PyObject *py_netr_DomainInformation_get_primary_domain(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_primary_domain;
	py_primary_domain = pytalloc_reference_ex(&netr_OneDomainInfo_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain);
	return py_primary_domain;
}

static int py_netr_DomainInformation_set_primary_domain(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->primary_domain");
		return -1;
	}
	PY_CHECK_TYPE(&netr_OneDomainInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->primary_domain = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DomainInformation_get_trusted_domain_count(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_trusted_domain_count;
	py_trusted_domain_count = PyLong_FromUnsignedLongLong((uint32_t)(object->trusted_domain_count));
	return py_trusted_domain_count;
}

static int py_netr_DomainInformation_set_trusted_domain_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_domain_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trusted_domain_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->trusted_domain_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainInformation_get_trusted_domains(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_trusted_domains;
	if (object->trusted_domains == NULL) {
		Py_RETURN_NONE;
	}
	if (object->trusted_domains == NULL) {
		py_trusted_domains = Py_None;
		Py_INCREF(py_trusted_domains);
	} else {
		py_trusted_domains = PyList_New(object->trusted_domain_count);
		if (py_trusted_domains == NULL) {
			return NULL;
		}
		{
			int trusted_domains_cntr_1;
			for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < (object->trusted_domain_count); trusted_domains_cntr_1++) {
				PyObject *py_trusted_domains_1;
				py_trusted_domains_1 = pytalloc_reference_ex(&netr_OneDomainInfo_Type, object->trusted_domains, &(object->trusted_domains)[trusted_domains_cntr_1]);
				PyList_SetItem(py_trusted_domains, trusted_domains_cntr_1, py_trusted_domains_1);
			}
		}
	}
	return py_trusted_domains;
}

static int py_netr_DomainInformation_set_trusted_domains(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->trusted_domains));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trusted_domains");
		return -1;
	}
	if (value == Py_None) {
		object->trusted_domains = NULL;
	} else {
		object->trusted_domains = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int trusted_domains_cntr_1;
			object->trusted_domains = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->trusted_domains, PyList_GET_SIZE(value));
			if (!object->trusted_domains) { return -1; }
			talloc_set_name_const(object->trusted_domains, "ARRAY: object->trusted_domains");
			for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < PyList_GET_SIZE(value); trusted_domains_cntr_1++) {
				if (PyList_GET_ITEM(value, trusted_domains_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->trusted_domains)[trusted_domains_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&netr_OneDomainInfo_Type, PyList_GET_ITEM(value, trusted_domains_cntr_1), return -1;);
				if (talloc_reference(object->trusted_domains, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, trusted_domains_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->trusted_domains)[trusted_domains_cntr_1] = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, trusted_domains_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DomainInformation_get_lsa_policy(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_lsa_policy;
	py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
	return py_lsa_policy;
}

static int py_netr_DomainInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->lsa_policy");
		return -1;
	}
	PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DomainInformation_get_dns_hostname(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_hostname;
	py_dns_hostname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_hostname);
	return py_dns_hostname;
}

static int py_netr_DomainInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_hostname");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dns_hostname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DomainInformation_get_dummy_string2(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string2;
	py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
	return py_dummy_string2;
}

static int py_netr_DomainInformation_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string2");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DomainInformation_get_dummy_string3(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string3;
	py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
	return py_dummy_string3;
}

static int py_netr_DomainInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string3");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DomainInformation_get_dummy_string4(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_string4;
	py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
	return py_dummy_string4;
}

static int py_netr_DomainInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_string4");
		return -1;
	}
	PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DomainInformation_get_workstation_flags(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_workstation_flags;
	py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->workstation_flags));
	return py_workstation_flags;
}

static int py_netr_DomainInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->workstation_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->workstation_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainInformation_get_supported_enc_types(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_supported_enc_types;
	py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)(object->supported_enc_types));
	return py_supported_enc_types;
}

static int py_netr_DomainInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->supported_enc_types");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->supported_enc_types = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainInformation_get_dummy_long3(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long3;
	py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long3));
	return py_dummy_long3;
}

static int py_netr_DomainInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long3");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long3 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainInformation_get_dummy_long4(PyObject *obj, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_dummy_long4;
	py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dummy_long4));
	return py_dummy_long4;
}

static int py_netr_DomainInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dummy_long4");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dummy_long4 = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DomainInformation_getsetters[] = {
	{
		.name = discard_const_p(char, "primary_domain"),
		.get = py_netr_DomainInformation_get_primary_domain,
		.set = py_netr_DomainInformation_set_primary_domain,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
	},
	{
		.name = discard_const_p(char, "trusted_domain_count"),
		.get = py_netr_DomainInformation_get_trusted_domain_count,
		.set = py_netr_DomainInformation_set_trusted_domain_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "trusted_domains"),
		.get = py_netr_DomainInformation_get_trusted_domains,
		.set = py_netr_DomainInformation_set_trusted_domains,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
	},
	{
		.name = discard_const_p(char, "lsa_policy"),
		.get = py_netr_DomainInformation_get_lsa_policy,
		.set = py_netr_DomainInformation_set_lsa_policy,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
	},
	{
		.name = discard_const_p(char, "dns_hostname"),
		.get = py_netr_DomainInformation_get_dns_hostname,
		.set = py_netr_DomainInformation_set_dns_hostname,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dummy_string2"),
		.get = py_netr_DomainInformation_get_dummy_string2,
		.set = py_netr_DomainInformation_set_dummy_string2,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dummy_string3"),
		.get = py_netr_DomainInformation_get_dummy_string3,
		.set = py_netr_DomainInformation_set_dummy_string3,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "dummy_string4"),
		.get = py_netr_DomainInformation_get_dummy_string4,
		.set = py_netr_DomainInformation_set_dummy_string4,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
	},
	{
		.name = discard_const_p(char, "workstation_flags"),
		.get = py_netr_DomainInformation_get_workstation_flags,
		.set = py_netr_DomainInformation_set_workstation_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
	},
	{
		.name = discard_const_p(char, "supported_enc_types"),
		.get = py_netr_DomainInformation_get_supported_enc_types,
		.set = py_netr_DomainInformation_set_supported_enc_types,
		.doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
	},
	{
		.name = discard_const_p(char, "dummy_long3"),
		.get = py_netr_DomainInformation_get_dummy_long3,
		.set = py_netr_DomainInformation_set_dummy_long3,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "dummy_long4"),
		.get = py_netr_DomainInformation_get_dummy_long4,
		.set = py_netr_DomainInformation_set_dummy_long4,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DomainInformation_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DomainInformation",
	.tp_getset = py_netr_DomainInformation_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DomainInformation_new,
};

static PyObject *py_import_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, union netr_DomainInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			if (in->domain_info == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_DomainInformation_Type, in->domain_info, in->domain_info);
			}
			return ret;

		case 2:
			if (in->lsa_policy_info == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
			}
			return ret;

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

static union netr_DomainInfo *py_export_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_DomainInfo *ret = talloc_zero(mem_ctx, union netr_DomainInfo);
	switch (level) {
		case 1:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->domain_info");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->domain_info = NULL;
			} else {
				ret->domain_info = NULL;
				PY_CHECK_TYPE(&netr_DomainInformation_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->domain_info = (struct netr_DomainInformation *)pytalloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->lsa_policy_info");
				talloc_free(ret); return NULL;
			}
			if (in == Py_None) {
				ret->lsa_policy_info = NULL;
			} else {
				ret->lsa_policy_info = NULL;
				PY_CHECK_TYPE(&netr_LsaPolicyInformation_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->lsa_policy_info = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(in);
			}
			break;

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

	return ret;
}

static PyObject *py_netr_DomainInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_DomainInfo *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_DomainInfo *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DomainInfo!");
		return NULL;
	}

	return py_import_netr_DomainInfo(mem_ctx, level, in);
}

static PyObject *py_netr_DomainInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_DomainInfo *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_DomainInfo(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_DomainInfo_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_DomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_DomainInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DomainInfo",
	.tp_getset = NULL,
	.tp_methods = py_netr_DomainInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DomainInfo_new,
};


static PyObject *py_NL_PASSWORD_VERSION_get_ReservedField(PyObject *obj, void *closure)
{
	struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(obj);
	PyObject *py_ReservedField;
	py_ReservedField = PyLong_FromUnsignedLongLong((uint32_t)(object->ReservedField));
	return py_ReservedField;
}

static int py_NL_PASSWORD_VERSION_set_ReservedField(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ReservedField");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ReservedField));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->ReservedField = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionNumber(PyObject *obj, void *closure)
{
	struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(obj);
	PyObject *py_PasswordVersionNumber;
	py_PasswordVersionNumber = PyLong_FromUnsignedLongLong((uint32_t)(object->PasswordVersionNumber));
	return py_PasswordVersionNumber;
}

static int py_NL_PASSWORD_VERSION_set_PasswordVersionNumber(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->PasswordVersionNumber");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionNumber));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->PasswordVersionNumber = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionPresent(PyObject *obj, void *closure)
{
	struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(obj);
	PyObject *py_PasswordVersionPresent;
	py_PasswordVersionPresent = PyLong_FromUnsignedLongLong((uint32_t)(object->PasswordVersionPresent));
	return py_PasswordVersionPresent;
}

static int py_NL_PASSWORD_VERSION_set_PasswordVersionPresent(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_PASSWORD_VERSION *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->PasswordVersionPresent");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionPresent));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->PasswordVersionPresent = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_NL_PASSWORD_VERSION_getsetters[] = {
	{
		.name = discard_const_p(char, "ReservedField"),
		.get = py_NL_PASSWORD_VERSION_get_ReservedField,
		.set = py_NL_PASSWORD_VERSION_set_ReservedField,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "PasswordVersionNumber"),
		.get = py_NL_PASSWORD_VERSION_get_PasswordVersionNumber,
		.set = py_NL_PASSWORD_VERSION_set_PasswordVersionNumber,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "PasswordVersionPresent"),
		.get = py_NL_PASSWORD_VERSION_get_PasswordVersionPresent,
		.set = py_NL_PASSWORD_VERSION_set_PasswordVersionPresent,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject NL_PASSWORD_VERSION_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.NL_PASSWORD_VERSION",
	.tp_getset = py_NL_PASSWORD_VERSION_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_NL_PASSWORD_VERSION_new,
};


static PyObject *py_netr_CryptPassword_get_data(PyObject *obj, void *closure)
{
	struct netr_CryptPassword *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	py_data = PyList_New(512);
	if (py_data == NULL) {
		return NULL;
	}
	{
		int data_cntr_0;
		for (data_cntr_0 = 0; data_cntr_0 < (512); data_cntr_0++) {
			PyObject *py_data_0;
			py_data_0 = PyLong_FromLong((uint16_t)((object->data)[data_cntr_0]));
			PyList_SetItem(py_data, data_cntr_0, py_data_0);
		}
	}
	return py_data;
}

static int py_netr_CryptPassword_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_CryptPassword *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int data_cntr_0;
		if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
			PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->data),  PyList_GET_SIZE(value));
			return -1;
		}
		for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
			if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_0]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_0]));
				if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->data)[data_cntr_0] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_CryptPassword_get_length(PyObject *obj, void *closure)
{
	struct netr_CryptPassword *object = pytalloc_get_ptr(obj);
	PyObject *py_length;
	py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
	return py_length;
}

static int py_netr_CryptPassword_set_length(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_CryptPassword *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->length");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->length = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_CryptPassword_getsetters[] = {
	{
		.name = discard_const_p(char, "data"),
		.get = py_netr_CryptPassword_get_data,
		.set = py_netr_CryptPassword_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "length"),
		.get = py_netr_CryptPassword_get_length,
		.set = py_netr_CryptPassword_set_length,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_CryptPassword_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_CryptPassword *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_CryptPassword);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_CryptPassword_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_CryptPassword *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_CryptPassword);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_CryptPassword);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_CryptPassword_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_CryptPassword *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_CryptPassword, "netr_CryptPassword", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_CryptPassword, "netr_CryptPassword", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_CryptPassword_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_CryptPassword_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CryptPassword_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CryptPassword_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_CryptPassword_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_CryptPassword",
	.tp_getset = py_netr_CryptPassword_getsetters,
	.tp_methods = py_netr_CryptPassword_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_CryptPassword_new,
};


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

static int py_netr_SendToSamResetBadPasswordCount_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SendToSamResetBadPasswordCount *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guid");
		return -1;
	}
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_SendToSamResetBadPasswordCount_getsetters[] = {
	{
		.name = discard_const_p(char, "guid"),
		.get = py_netr_SendToSamResetBadPasswordCount_get_guid,
		.set = py_netr_SendToSamResetBadPasswordCount_set_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_SendToSamResetBadPasswordCount_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SendToSamResetBadPasswordCount",
	.tp_getset = py_netr_SendToSamResetBadPasswordCount_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SendToSamResetBadPasswordCount_new,
};

static PyObject *py_import_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, union netr_SendToSamMessage *in)
{
	PyObject *ret;

	switch (level) {
		case SendToSamResetBadPasswordCount:
			ret = pytalloc_reference_ex(&netr_SendToSamResetBadPasswordCount_Type, mem_ctx, &in->reset_bad_password);
			return ret;

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

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

static union netr_SendToSamMessage *py_export_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union netr_SendToSamMessage *ret = talloc_zero(mem_ctx, union netr_SendToSamMessage);
	switch (level) {
		case SendToSamResetBadPasswordCount:
			if (in == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->reset_bad_password");
				talloc_free(ret); return NULL;
			}
			PY_CHECK_TYPE(&netr_SendToSamResetBadPasswordCount_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->reset_bad_password = *(struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(in);
			break;

		default:
			break;

	}

	return ret;
}

static PyObject *py_netr_SendToSamMessage_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in_obj = NULL;
	union netr_SendToSamMessage *in = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in_obj)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}
	in = (union netr_SendToSamMessage *)pytalloc_get_ptr(in_obj);
	if (in == NULL) {
		PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_SendToSamMessage!");
		return NULL;
	}

	return py_import_netr_SendToSamMessage(mem_ctx, level, in);
}

static PyObject *py_netr_SendToSamMessage_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
	PyObject *mem_ctx_obj = NULL;
	TALLOC_CTX *mem_ctx = NULL;
	int level = 0;
	PyObject *in = NULL;
	union netr_SendToSamMessage *out = NULL;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
		discard_const_p(char *, kwnames),
		&mem_ctx_obj,
		&level,
		&in)) {
		return NULL;
	}
	mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
	if (mem_ctx == NULL) {
		PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
		return NULL;
	}

	out = py_export_netr_SendToSamMessage(mem_ctx, level, in);
	if (out == NULL) {
		return NULL;
	}

	return pytalloc_GenericObject_reference(out);
}

static PyMethodDef py_netr_SendToSamMessage_methods[] = {
	{ "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_import),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__import__(mem_ctx, level, in) => ret." },
	{ "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_export),
		METH_VARARGS|METH_KEYWORDS|METH_CLASS,
		"T.__export__(mem_ctx, level, in) => ret." },
	{ NULL, NULL, 0, NULL }
};

static PyObject *py_netr_SendToSamMessage_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
	return NULL;
}


static PyTypeObject netr_SendToSamMessage_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SendToSamMessage",
	.tp_getset = NULL,
	.tp_methods = py_netr_SendToSamMessage_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SendToSamMessage_new,
};


static PyObject *py_netr_SendToSamBase_get_message_type(PyObject *obj, void *closure)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(obj);
	PyObject *py_message_type;
	py_message_type = PyLong_FromLong((uint16_t)(object->message_type));
	return py_message_type;
}

static int py_netr_SendToSamBase_set_message_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->message_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->message_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SendToSamBase_get_message_size(PyObject *obj, void *closure)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(obj);
	PyObject *py_message_size;
	py_message_size = PyLong_FromUnsignedLongLong((uint32_t)(object->message_size));
	return py_message_size;
}

static int py_netr_SendToSamBase_set_message_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->message_size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->message_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_SendToSamBase_get_message(PyObject *obj, void *closure)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(obj);
	PyObject *py_message;
	py_message = pyrpc_import_union(&netr_SendToSamMessage_Type, pytalloc_get_mem_ctx(obj), object->message_type, &object->message, "union netr_SendToSamMessage");
	if (py_message == NULL) {
		return NULL;
	}
	return py_message;
}

static int py_netr_SendToSamBase_set_message(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->message");
		return -1;
	}
	{
		union netr_SendToSamMessage *message_switch_1;
		message_switch_1 = (union netr_SendToSamMessage *)pyrpc_export_union(&netr_SendToSamMessage_Type, pytalloc_get_mem_ctx(py_obj), object->message_type, value, "union netr_SendToSamMessage");
		if (message_switch_1 == NULL) {
			return -1;
		}
		object->message = *message_switch_1;
	}
	return 0;
}

static PyGetSetDef py_netr_SendToSamBase_getsetters[] = {
	{
		.name = discard_const_p(char, "message_type"),
		.get = py_netr_SendToSamBase_get_message_type,
		.set = py_netr_SendToSamBase_set_message_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamType")
	},
	{
		.name = discard_const_p(char, "message_size"),
		.get = py_netr_SendToSamBase_get_message_size,
		.set = py_netr_SendToSamBase_set_message_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "message"),
		.get = py_netr_SendToSamBase_get_message,
		.set = py_netr_SendToSamBase_set_message,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamMessage")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_SendToSamBase_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SendToSamBase);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_SendToSamBase_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_SendToSamBase);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SendToSamBase);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_SendToSamBase_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_SendToSamBase *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SendToSamBase, "netr_SendToSamBase", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SendToSamBase, "netr_SendToSamBase", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_SendToSamBase_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_SendToSamBase_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamBase_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamBase_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_SendToSamBase_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_SendToSamBase",
	.tp_getset = py_netr_SendToSamBase_getsetters,
	.tp_methods = py_netr_SendToSamBase_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_SendToSamBase_new,
};


static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_count(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_netr_DsRAddressToSitenamesWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_sitename(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(obj);
	PyObject *py_sitename;
	if (object->sitename == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sitename == NULL) {
		py_sitename = Py_None;
		Py_INCREF(py_sitename);
	} else {
		py_sitename = PyList_New(object->count);
		if (py_sitename == NULL) {
			return NULL;
		}
		{
			int sitename_cntr_1;
			for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
				PyObject *py_sitename_1;
				py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &(object->sitename)[sitename_cntr_1]);
				PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
			}
		}
	}
	return py_sitename;
}

static int py_netr_DsRAddressToSitenamesWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesWCtr *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sitename");
		return -1;
	}
	if (value == Py_None) {
		object->sitename = NULL;
	} else {
		object->sitename = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int sitename_cntr_1;
			object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
			if (!object->sitename) { return -1; }
			talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
			for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
				if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sitename)[sitename_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
				if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->sitename)[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DsRAddressToSitenamesWCtr_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_netr_DsRAddressToSitenamesWCtr_get_count,
		.set = py_netr_DsRAddressToSitenamesWCtr_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sitename"),
		.get = py_netr_DsRAddressToSitenamesWCtr_get_sitename,
		.set = py_netr_DsRAddressToSitenamesWCtr_set_sitename,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRAddressToSitenamesWCtr",
	.tp_getset = py_netr_DsRAddressToSitenamesWCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRAddressToSitenamesWCtr_new,
};


static PyObject *py_netr_DsRAddress_get_buffer(PyObject *obj, void *closure)
{
	struct netr_DsRAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_buffer;
	if (object->buffer == NULL) {
		Py_RETURN_NONE;
	}
	if (object->buffer == NULL) {
		py_buffer = Py_None;
		Py_INCREF(py_buffer);
	} else {
		py_buffer = PyList_New(object->size);
		if (py_buffer == NULL) {
			return NULL;
		}
		{
			int buffer_cntr_1;
			for (buffer_cntr_1 = 0; buffer_cntr_1 < (object->size); buffer_cntr_1++) {
				PyObject *py_buffer_1;
				py_buffer_1 = PyLong_FromLong((uint16_t)((object->buffer)[buffer_cntr_1]));
				PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
			}
		}
	}
	return py_buffer;
}

static int py_netr_DsRAddress_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddress *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffer));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->buffer");
		return -1;
	}
	if (value == Py_None) {
		object->buffer = NULL;
	} else {
		object->buffer = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int buffer_cntr_1;
			object->buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffer, PyList_GET_SIZE(value));
			if (!object->buffer) { return -1; }
			talloc_set_name_const(object->buffer, "ARRAY: object->buffer");
			for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(value); buffer_cntr_1++) {
				if (PyList_GET_ITEM(value, buffer_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->buffer)[buffer_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->buffer)[buffer_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, buffer_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, buffer_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->buffer)[buffer_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddress_get_size(PyObject *obj, void *closure)
{
	struct netr_DsRAddress *object = pytalloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromUnsignedLongLong((uint32_t)(object->size));
	return py_size;
}

static int py_netr_DsRAddress_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddress *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DsRAddress_getsetters[] = {
	{
		.name = discard_const_p(char, "buffer"),
		.get = py_netr_DsRAddress_get_buffer,
		.set = py_netr_DsRAddress_set_buffer,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "size"),
		.get = py_netr_DsRAddress_get_size,
		.set = py_netr_DsRAddress_set_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DsRAddress_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRAddress",
	.tp_getset = py_netr_DsRAddress_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRAddress_new,
};


static PyObject *py_netr_DomainTrust_get_netbios_name(PyObject *obj, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
	PyObject *py_netbios_name;
	if (object->netbios_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->netbios_name == NULL) {
		py_netbios_name = Py_None;
		Py_INCREF(py_netbios_name);
	} else {
		if (object->netbios_name == NULL) {
			py_netbios_name = Py_None;
			Py_INCREF(py_netbios_name);
		} else {
			py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
		}
	}
	return py_netbios_name;
}

static int py_netr_DomainTrust_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->netbios_name");
		return -1;
	}
	if (value == Py_None) {
		object->netbios_name = NULL;
	} else {
		object->netbios_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->netbios_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainTrust_get_dns_name(PyObject *obj, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_name;
	if (object->dns_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dns_name == NULL) {
		py_dns_name = Py_None;
		Py_INCREF(py_dns_name);
	} else {
		if (object->dns_name == NULL) {
			py_dns_name = Py_None;
			Py_INCREF(py_dns_name);
		} else {
			py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
		}
	}
	return py_dns_name;
}

static int py_netr_DomainTrust_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_name");
		return -1;
	}
	if (value == Py_None) {
		object->dns_name = NULL;
	} else {
		object->dns_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dns_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainTrust_get_trust_flags(PyObject *obj, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_flags;
	py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_flags));
	return py_trust_flags;
}

static int py_netr_DomainTrust_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->trust_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainTrust_get_parent_index(PyObject *obj, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
	PyObject *py_parent_index;
	py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)(object->parent_index));
	return py_parent_index;
}

static int py_netr_DomainTrust_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->parent_index");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->parent_index = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainTrust_get_trust_type(PyObject *obj, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_type;
	py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_type));
	return py_trust_type;
}

static int py_netr_DomainTrust_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->trust_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainTrust_get_trust_attributes(PyObject *obj, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_attributes;
	py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->trust_attributes));
	return py_trust_attributes;
}

static int py_netr_DomainTrust_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->trust_attributes");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->trust_attributes = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainTrust_get_sid(PyObject *obj, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(obj);
	PyObject *py_sid;
	if (object->sid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sid == NULL) {
		py_sid = Py_None;
		Py_INCREF(py_sid);
	} else {
		py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
	}
	return py_sid;
}

static int py_netr_DomainTrust_set_sid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sid");
		return -1;
	}
	if (value == Py_None) {
		object->sid = NULL;
	} else {
		object->sid = NULL;
		PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
	}
	return 0;
}

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

static int py_netr_DomainTrust_set_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->guid");
		return -1;
	}
	PY_CHECK_TYPE(GUID_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->guid = *(struct GUID *)pytalloc_get_ptr(value);
	return 0;
}

static PyGetSetDef py_netr_DomainTrust_getsetters[] = {
	{
		.name = discard_const_p(char, "netbios_name"),
		.get = py_netr_DomainTrust_get_netbios_name,
		.set = py_netr_DomainTrust_set_netbios_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dns_name"),
		.get = py_netr_DomainTrust_get_dns_name,
		.set = py_netr_DomainTrust_set_dns_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "trust_flags"),
		.get = py_netr_DomainTrust_get_trust_flags,
		.set = py_netr_DomainTrust_set_trust_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
	},
	{
		.name = discard_const_p(char, "parent_index"),
		.get = py_netr_DomainTrust_get_parent_index,
		.set = py_netr_DomainTrust_set_parent_index,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "trust_type"),
		.get = py_netr_DomainTrust_get_trust_type,
		.set = py_netr_DomainTrust_set_trust_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
	},
	{
		.name = discard_const_p(char, "trust_attributes"),
		.get = py_netr_DomainTrust_get_trust_attributes,
		.set = py_netr_DomainTrust_set_trust_attributes,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
	},
	{
		.name = discard_const_p(char, "sid"),
		.get = py_netr_DomainTrust_get_sid,
		.set = py_netr_DomainTrust_set_sid,
		.doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
	},
	{
		.name = discard_const_p(char, "guid"),
		.get = py_netr_DomainTrust_get_guid,
		.set = py_netr_DomainTrust_set_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_DomainTrust_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DomainTrust);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_DomainTrust_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_DomainTrust);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrust);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_DomainTrust_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_DomainTrust *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrust, "netr_DomainTrust", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrust, "netr_DomainTrust", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_DomainTrust_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_DomainTrust_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrust_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrust_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DomainTrust_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DomainTrust",
	.tp_getset = py_netr_DomainTrust_getsetters,
	.tp_methods = py_netr_DomainTrust_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DomainTrust_new,
};


static PyObject *py_netr_DomainTrustList_get_count(PyObject *obj, void *closure)
{
	struct netr_DomainTrustList *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_netr_DomainTrustList_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DomainTrustList_get_array(PyObject *obj, void *closure)
{
	struct netr_DomainTrustList *object = pytalloc_get_ptr(obj);
	PyObject *py_array;
	if (object->array == NULL) {
		Py_RETURN_NONE;
	}
	if (object->array == NULL) {
		py_array = Py_None;
		Py_INCREF(py_array);
	} else {
		py_array = PyList_New(object->count);
		if (py_array == NULL) {
			return NULL;
		}
		{
			int array_cntr_1;
			for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
				PyObject *py_array_1;
				py_array_1 = pytalloc_reference_ex(&netr_DomainTrust_Type, object->array, &(object->array)[array_cntr_1]);
				PyList_SetItem(py_array, array_cntr_1, py_array_1);
			}
		}
	}
	return py_array;
}

static int py_netr_DomainTrustList_set_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->array");
		return -1;
	}
	if (value == Py_None) {
		object->array = NULL;
	} else {
		object->array = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int array_cntr_1;
			object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
			if (!object->array) { return -1; }
			talloc_set_name_const(object->array, "ARRAY: object->array");
			for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
				if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->array)[array_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&netr_DomainTrust_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
				if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->array)[array_cntr_1] = *(struct netr_DomainTrust *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DomainTrustList_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_netr_DomainTrustList_get_count,
		.set = py_netr_DomainTrustList_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "array"),
		.get = py_netr_DomainTrustList_get_array,
		.set = py_netr_DomainTrustList_set_array,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrust")
	},
	{ .name = NULL }
};

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

static PyObject *py_netr_DomainTrustList_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DomainTrustList);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_netr_DomainTrustList_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_netr_DomainTrustList);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DomainTrustList);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_netr_DomainTrustList_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct netr_DomainTrustList *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrustList, "netr_DomainTrustList", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DomainTrustList, "netr_DomainTrustList", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_netr_DomainTrustList_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_netr_DomainTrustList_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrustList_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainTrustList_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DomainTrustList_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DomainTrustList",
	.tp_getset = py_netr_DomainTrustList_getsetters,
	.tp_methods = py_netr_DomainTrustList_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DomainTrustList_new,
};


static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_count(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_netr_DsRAddressToSitenamesExWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_sitename(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(obj);
	PyObject *py_sitename;
	if (object->sitename == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sitename == NULL) {
		py_sitename = Py_None;
		Py_INCREF(py_sitename);
	} else {
		py_sitename = PyList_New(object->count);
		if (py_sitename == NULL) {
			return NULL;
		}
		{
			int sitename_cntr_1;
			for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
				PyObject *py_sitename_1;
				py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &(object->sitename)[sitename_cntr_1]);
				PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
			}
		}
	}
	return py_sitename;
}

static int py_netr_DsRAddressToSitenamesExWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sitename");
		return -1;
	}
	if (value == Py_None) {
		object->sitename = NULL;
	} else {
		object->sitename = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int sitename_cntr_1;
			object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
			if (!object->sitename) { return -1; }
			talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
			for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
				if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sitename)[sitename_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
				if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->sitename)[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
			}
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_subnetname(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(obj);
	PyObject *py_subnetname;
	if (object->subnetname == NULL) {
		Py_RETURN_NONE;
	}
	if (object->subnetname == NULL) {
		py_subnetname = Py_None;
		Py_INCREF(py_subnetname);
	} else {
		py_subnetname = PyList_New(object->count);
		if (py_subnetname == NULL) {
			return NULL;
		}
		{
			int subnetname_cntr_1;
			for (subnetname_cntr_1 = 0; subnetname_cntr_1 < (object->count); subnetname_cntr_1++) {
				PyObject *py_subnetname_1;
				py_subnetname_1 = pytalloc_reference_ex(lsa_String_Type, object->subnetname, &(object->subnetname)[subnetname_cntr_1]);
				PyList_SetItem(py_subnetname, subnetname_cntr_1, py_subnetname_1);
			}
		}
	}
	return py_subnetname;
}

static int py_netr_DsRAddressToSitenamesExWCtr_set_subnetname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExWCtr *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->subnetname));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->subnetname");
		return -1;
	}
	if (value == Py_None) {
		object->subnetname = NULL;
	} else {
		object->subnetname = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int subnetname_cntr_1;
			object->subnetname = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->subnetname, PyList_GET_SIZE(value));
			if (!object->subnetname) { return -1; }
			talloc_set_name_const(object->subnetname, "ARRAY: object->subnetname");
			for (subnetname_cntr_1 = 0; subnetname_cntr_1 < PyList_GET_SIZE(value); subnetname_cntr_1++) {
				if (PyList_GET_ITEM(value, subnetname_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->subnetname)[subnetname_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, subnetname_cntr_1), return -1;);
				if (talloc_reference(object->subnetname, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, subnetname_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->subnetname)[subnetname_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, subnetname_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_DsRAddressToSitenamesExWCtr_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_netr_DsRAddressToSitenamesExWCtr_get_count,
		.set = py_netr_DsRAddressToSitenamesExWCtr_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sitename"),
		.get = py_netr_DsRAddressToSitenamesExWCtr_get_sitename,
		.set = py_netr_DsRAddressToSitenamesExWCtr_set_sitename,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{
		.name = discard_const_p(char, "subnetname"),
		.get = py_netr_DsRAddressToSitenamesExWCtr_get_subnetname,
		.set = py_netr_DsRAddressToSitenamesExWCtr_set_subnetname,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRAddressToSitenamesExWCtr",
	.tp_getset = py_netr_DsRAddressToSitenamesExWCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRAddressToSitenamesExWCtr_new,
};


static PyObject *py_DcSitesCtr_get_num_sites(PyObject *obj, void *closure)
{
	struct DcSitesCtr *object = pytalloc_get_ptr(obj);
	PyObject *py_num_sites;
	py_num_sites = PyLong_FromUnsignedLongLong((uint32_t)(object->num_sites));
	return py_num_sites;
}

static int py_DcSitesCtr_set_num_sites(PyObject *py_obj, PyObject *value, void *closure)
{
	struct DcSitesCtr *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->num_sites");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sites));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->num_sites = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_DcSitesCtr_get_sites(PyObject *obj, void *closure)
{
	struct DcSitesCtr *object = pytalloc_get_ptr(obj);
	PyObject *py_sites;
	if (object->sites == NULL) {
		Py_RETURN_NONE;
	}
	if (object->sites == NULL) {
		py_sites = Py_None;
		Py_INCREF(py_sites);
	} else {
		py_sites = PyList_New(object->num_sites);
		if (py_sites == NULL) {
			return NULL;
		}
		{
			int sites_cntr_1;
			for (sites_cntr_1 = 0; sites_cntr_1 < (object->num_sites); sites_cntr_1++) {
				PyObject *py_sites_1;
				py_sites_1 = pytalloc_reference_ex(lsa_String_Type, object->sites, &(object->sites)[sites_cntr_1]);
				PyList_SetItem(py_sites, sites_cntr_1, py_sites_1);
			}
		}
	}
	return py_sites;
}

static int py_DcSitesCtr_set_sites(PyObject *py_obj, PyObject *value, void *closure)
{
	struct DcSitesCtr *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sites));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->sites");
		return -1;
	}
	if (value == Py_None) {
		object->sites = NULL;
	} else {
		object->sites = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int sites_cntr_1;
			object->sites = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sites, PyList_GET_SIZE(value));
			if (!object->sites) { return -1; }
			talloc_set_name_const(object->sites, "ARRAY: object->sites");
			for (sites_cntr_1 = 0; sites_cntr_1 < PyList_GET_SIZE(value); sites_cntr_1++) {
				if (PyList_GET_ITEM(value, sites_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->sites)[sites_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sites_cntr_1), return -1;);
				if (talloc_reference(object->sites, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sites_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->sites)[sites_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sites_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_DcSitesCtr_getsetters[] = {
	{
		.name = discard_const_p(char, "num_sites"),
		.get = py_DcSitesCtr_get_num_sites,
		.set = py_DcSitesCtr_set_num_sites,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "sites"),
		.get = py_DcSitesCtr_get_sites,
		.set = py_DcSitesCtr_set_sites,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{ .name = NULL }
};

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


static PyTypeObject DcSitesCtr_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.DcSitesCtr",
	.tp_getset = py_DcSitesCtr_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_DcSitesCtr_new,
};


static PyObject *py_netr_TrustInfo_get_count(PyObject *obj, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_netr_TrustInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_TrustInfo_get_data(PyObject *obj, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->data == NULL) {
		Py_RETURN_NONE;
	}
	if (object->data == NULL) {
		py_data = Py_None;
		Py_INCREF(py_data);
	} else {
		py_data = PyList_New(object->count);
		if (py_data == NULL) {
			return NULL;
		}
		{
			int data_cntr_1;
			for (data_cntr_1 = 0; data_cntr_1 < (object->count); data_cntr_1++) {
				PyObject *py_data_1;
				py_data_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->data)[data_cntr_1]));
				PyList_SetItem(py_data, data_cntr_1, py_data_1);
			}
		}
	}
	return py_data;
}

static int py_netr_TrustInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
		return -1;
	}
	if (value == Py_None) {
		object->data = NULL;
	} else {
		object->data = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int data_cntr_1;
			object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
			if (!object->data) { return -1; }
			talloc_set_name_const(object->data, "ARRAY: object->data");
			for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
				if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->data)[data_cntr_1]");
					return -1;
				}
				{
					const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->data)[data_cntr_1]));
					if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
						unsigned long long test_var;
						test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
						if (PyErr_Occurred() != NULL) {
							return -1;
						}
						if (test_var > uint_max) {
							PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
							  PyLong_Type.tp_name, uint_max, test_var);
							return -1;
						}
						(object->data)[data_cntr_1] = test_var;
					} else {
						PyErr_Format(PyExc_TypeError, "Expected type %s",
						  PyLong_Type.tp_name);
						return -1;
					}
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_TrustInfo_get_entry_count(PyObject *obj, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_entry_count;
	py_entry_count = PyLong_FromUnsignedLongLong((uint32_t)(object->entry_count));
	return py_entry_count;
}

static int py_netr_TrustInfo_set_entry_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->entry_count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->entry_count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->entry_count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_TrustInfo_get_entries(PyObject *obj, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_entries;
	if (object->entries == NULL) {
		Py_RETURN_NONE;
	}
	if (object->entries == NULL) {
		py_entries = Py_None;
		Py_INCREF(py_entries);
	} else {
		py_entries = PyList_New(object->count);
		if (py_entries == NULL) {
			return NULL;
		}
		{
			int entries_cntr_1;
			for (entries_cntr_1 = 0; entries_cntr_1 < (object->count); entries_cntr_1++) {
				PyObject *py_entries_1;
				py_entries_1 = pytalloc_reference_ex(lsa_String_Type, object->entries, &(object->entries)[entries_cntr_1]);
				PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
			}
		}
	}
	return py_entries;
}

static int py_netr_TrustInfo_set_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_TrustInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->entries));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->entries");
		return -1;
	}
	if (value == Py_None) {
		object->entries = NULL;
	} else {
		object->entries = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int entries_cntr_1;
			object->entries = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
			if (!object->entries) { return -1; }
			talloc_set_name_const(object->entries, "ARRAY: object->entries");
			for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
				if (PyList_GET_ITEM(value, entries_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->entries)[entries_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
				if (talloc_reference(object->entries, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->entries)[entries_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_netr_TrustInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_netr_TrustInfo_get_count,
		.set = py_netr_TrustInfo_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "data"),
		.get = py_netr_TrustInfo_get_data,
		.set = py_netr_TrustInfo_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "entry_count"),
		.get = py_netr_TrustInfo_get_entry_count,
		.set = py_netr_TrustInfo_set_entry_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "entries"),
		.get = py_netr_TrustInfo_get_entries,
		.set = py_netr_TrustInfo_set_entries,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
	},
	{ .name = NULL }
};

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


static PyTypeObject netr_TrustInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_TrustInfo",
	.tp_getset = py_netr_TrustInfo_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_TrustInfo_new,
};


static PyObject *py_NL_DNS_NAME_INFO_get_type(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_type;
	py_type = PyLong_FromLong((uint16_t)(object->type));
	return py_type;
}

static int py_NL_DNS_NAME_INFO_set_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_domain_info;
	if (object->dns_domain_info == NULL) {
		Py_RETURN_NONE;
	}
	if (object->dns_domain_info == NULL) {
		py_dns_domain_info = Py_None;
		Py_INCREF(py_dns_domain_info);
	} else {
		if (object->dns_domain_info == NULL) {
			py_dns_domain_info = Py_None;
			Py_INCREF(py_dns_domain_info);
		} else {
			py_dns_domain_info = PyUnicode_Decode(object->dns_domain_info, strlen(object->dns_domain_info), "utf-8", "ignore");
		}
	}
	return py_dns_domain_info;
}

static int py_NL_DNS_NAME_INFO_set_dns_domain_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domain_info");
		return -1;
	}
	if (value == Py_None) {
		object->dns_domain_info = NULL;
	} else {
		object->dns_domain_info = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->dns_domain_info = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info_type(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_domain_info_type;
	py_dns_domain_info_type = PyLong_FromLong((uint16_t)(object->dns_domain_info_type));
	return py_dns_domain_info_type;
}

static int py_NL_DNS_NAME_INFO_set_dns_domain_info_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_domain_info_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_domain_info_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dns_domain_info_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_get_priority(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_priority;
	py_priority = PyLong_FromUnsignedLongLong((uint32_t)(object->priority));
	return py_priority;
}

static int py_NL_DNS_NAME_INFO_set_priority(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->priority");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->priority = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_get_weight(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_weight;
	py_weight = PyLong_FromUnsignedLongLong((uint32_t)(object->weight));
	return py_weight;
}

static int py_NL_DNS_NAME_INFO_set_weight(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->weight");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weight));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->weight = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_get_port(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_port;
	py_port = PyLong_FromUnsignedLongLong((uint32_t)(object->port));
	return py_port;
}

static int py_NL_DNS_NAME_INFO_set_port(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->port");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->port));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->port = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_get_dns_register(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_register;
	py_dns_register = PyLong_FromUnsignedLongLong((uint32_t)(object->dns_register));
	return py_dns_register;
}

static int py_NL_DNS_NAME_INFO_set_dns_register(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dns_register");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_register));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->dns_register = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_get_status(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(obj);
	PyObject *py_status;
	py_status = PyLong_FromUnsignedLongLong((uint32_t)(object->status));
	return py_status;
}

static int py_NL_DNS_NAME_INFO_set_status(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->status");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->status = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyGetSetDef py_NL_DNS_NAME_INFO_getsetters[] = {
	{
		.name = discard_const_p(char, "type"),
		.get = py_NL_DNS_NAME_INFO_get_type,
		.set = py_NL_DNS_NAME_INFO_set_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsType")
	},
	{
		.name = discard_const_p(char, "dns_domain_info"),
		.get = py_NL_DNS_NAME_INFO_get_dns_domain_info,
		.set = py_NL_DNS_NAME_INFO_set_dns_domain_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "dns_domain_info_type"),
		.get = py_NL_DNS_NAME_INFO_get_dns_domain_info_type,
		.set = py_NL_DNS_NAME_INFO_set_dns_domain_info_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsDomainInfoType")
	},
	{
		.name = discard_const_p(char, "priority"),
		.get = py_NL_DNS_NAME_INFO_get_priority,
		.set = py_NL_DNS_NAME_INFO_set_priority,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "weight"),
		.get = py_NL_DNS_NAME_INFO_get_weight,
		.set = py_NL_DNS_NAME_INFO_set_weight,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "port"),
		.get = py_NL_DNS_NAME_INFO_get_port,
		.set = py_NL_DNS_NAME_INFO_set_port,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "dns_register"),
		.get = py_NL_DNS_NAME_INFO_get_dns_register,
		.set = py_NL_DNS_NAME_INFO_set_dns_register,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "status"),
		.get = py_NL_DNS_NAME_INFO_get_status,
		.set = py_NL_DNS_NAME_INFO_set_status,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{ .name = NULL }
};

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


static PyTypeObject NL_DNS_NAME_INFO_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.NL_DNS_NAME_INFO",
	.tp_getset = py_NL_DNS_NAME_INFO_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_NL_DNS_NAME_INFO_new,
};


static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_count(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
	return py_count;
}

static int py_NL_DNS_NAME_INFO_ARRAY_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_names(PyObject *obj, void *closure)
{
	struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(obj);
	PyObject *py_names;
	if (object->names == NULL) {
		Py_RETURN_NONE;
	}
	if (object->names == NULL) {
		py_names = Py_None;
		Py_INCREF(py_names);
	} else {
		py_names = PyList_New(object->count);
		if (py_names == NULL) {
			return NULL;
		}
		{
			int names_cntr_1;
			for (names_cntr_1 = 0; names_cntr_1 < (object->count); names_cntr_1++) {
				PyObject *py_names_1;
				py_names_1 = pytalloc_reference_ex(&NL_DNS_NAME_INFO_Type, object->names, &(object->names)[names_cntr_1]);
				PyList_SetItem(py_names, names_cntr_1, py_names_1);
			}
		}
	}
	return py_names;
}

static int py_NL_DNS_NAME_INFO_ARRAY_set_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->names));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->names");
		return -1;
	}
	if (value == Py_None) {
		object->names = NULL;
	} else {
		object->names = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int names_cntr_1;
			object->names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->names, PyList_GET_SIZE(value));
			if (!object->names) { return -1; }
			talloc_set_name_const(object->names, "ARRAY: object->names");
			for (names_cntr_1 = 0; names_cntr_1 < PyList_GET_SIZE(value); names_cntr_1++) {
				if (PyList_GET_ITEM(value, names_cntr_1) == NULL) {
					PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->names)[names_cntr_1]");
					return -1;
				}
				PY_CHECK_TYPE(&NL_DNS_NAME_INFO_Type, PyList_GET_ITEM(value, names_cntr_1), return -1;);
				if (talloc_reference(object->names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, names_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				(object->names)[names_cntr_1] = *(struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(PyList_GET_ITEM(value, names_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_NL_DNS_NAME_INFO_ARRAY_getsetters[] = {
	{
		.name = discard_const_p(char, "count"),
		.get = py_NL_DNS_NAME_INFO_ARRAY_get_count,
		.set = py_NL_DNS_NAME_INFO_ARRAY_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "names"),
		.get = py_NL_DNS_NAME_INFO_ARRAY_get_names,
		.set = py_NL_DNS_NAME_INFO_ARRAY_set_names,
		.doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO")
	},
	{ .name = NULL }
};

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

static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
{
	struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;
	TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
	if (tmp_ctx == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}
	err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_NL_DNS_NAME_INFO_ARRAY);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(tmp_ctx);
		PyErr_SetNdrError(err);
		return NULL;
	}

	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(tmp_ctx);
	return ret;
}

static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
	DATA_BLOB blob = {.data = NULL, .length = 0};
	Py_ssize_t 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, PYARG_BYTES_LEN "|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_NL_DNS_NAME_INFO_ARRAY);
	} else {
		err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_NL_DNS_NAME_INFO_ARRAY);
	}
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	struct NL_DNS_NAME_INFO_ARRAY *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_struct_secret_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_NL_DNS_NAME_INFO_ARRAY, "NL_DNS_NAME_INFO_ARRAY", object);
	} else {
		retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_NL_DNS_NAME_INFO_ARRAY, "NL_DNS_NAME_INFO_ARRAY", object);
		}
	ret = PyUnicode_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_NL_DNS_NAME_INFO_ARRAY_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_NL_DNS_NAME_INFO_ARRAY_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_NL_DNS_NAME_INFO_ARRAY_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
	{ "__ndr_print__", PY_DISCARD_FUNC_SIG(PyCFunction,py_NL_DNS_NAME_INFO_ARRAY_ndr_print), METH_VARARGS|METH_KEYWORDS, "S.ndr_print(object, print_secrets=False) -> String\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.NL_DNS_NAME_INFO_ARRAY",
	.tp_getset = py_NL_DNS_NAME_INFO_ARRAY_getsetters,
	.tp_methods = py_NL_DNS_NAME_INFO_ARRAY_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_NL_DNS_NAME_INFO_ARRAY_new,
};



static PyObject *py_netr_LogonUasLogon_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_LogonUasLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonUasLogon_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_LogonUasLogon_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_LogonUasLogon_in_get_workstation(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_workstation;
	if (object->in.workstation == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.workstation == NULL) {
		py_workstation = Py_None;
		Py_INCREF(py_workstation);
	} else {
		py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
	}
	return py_workstation;
}

static int py_netr_LogonUasLogon_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.workstation");
		return -1;
	}
	object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
	if (object->in.workstation == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.workstation = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_LogonUasLogon_out_get_info(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *object->out.info, *object->out.info);
	}
	return py_info;
}

static int py_netr_LogonUasLogon_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
	if (object->out.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.info = NULL;
	} else {
		*object->out.info = NULL;
		PY_CHECK_TYPE(&netr_UasInfo_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.info = (struct netr_UasInfo *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonUasLogon_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_LogonUasLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonUasLogon_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonUasLogon_in_get_server_name,
		.set = py_netr_LogonUasLogon_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_LogonUasLogon_in_get_account_name,
		.set = py_netr_LogonUasLogon_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_workstation"),
		.get = py_netr_LogonUasLogon_in_get_workstation,
		.set = py_netr_LogonUasLogon_in_set_workstation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_netr_LogonUasLogon_out_get_info,
		.set = py_netr_LogonUasLogon_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UasInfo")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonUasLogon_get_result,
		.set = py_netr_LogonUasLogon_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonUasLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonUasLogon, type);
	struct netr_LogonUasLogon *_self = (struct netr_LogonUasLogon *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	/* a pointer to a NULL pointer */
	_self->out.info = talloc_zero(mem_ctx, struct netr_UasInfo *);
	return self;
}

static PyObject *py_netr_LogonUasLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(0);
}

static PyObject *py_netr_LogonUasLogon_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 1) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[0];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonUasLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonUasLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonUasLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 1) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[0];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonUasLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonUasLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonUasLogon_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonUasLogon *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 1) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[0];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonUasLogon_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonUasLogon_ndr_print(py_obj, args, kwargs, "netr_LogonUasLogon_in", NDR_IN);
}

static PyObject *py_netr_LogonUasLogon_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonUasLogon_ndr_print(py_obj, args, kwargs, "netr_LogonUasLogon_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonUasLogon_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonUasLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonUasLogon.opnum() -> 0 (0x00) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonUasLogon_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonUasLogon",
	.tp_getset = py_netr_LogonUasLogon_getsetters,
	.tp_methods = py_netr_LogonUasLogon_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonUasLogon_new,
};

static bool pack_py_netr_LogonUasLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogon *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_workstation;
	const char *kwnames[] = {
		"server_name", "account_name", "workstation", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogon", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_workstation == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.workstation");
		return false;
	}
	r->in.workstation = talloc_ptrtype(r, r->in.workstation);
	if (r->in.workstation == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_workstation)) {
			unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_workstation)) {
			test_str = PyBytes_AS_STRING(py_workstation);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.workstation = talloc_str;
	}
	return true;
}

static PyObject *unpack_py_netr_LogonUasLogon_args_out(struct netr_LogonUasLogon *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *r->out.info, *r->out.info);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_info);
	}
	if (result_size == 1) {
		result = py_info;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonUasLogoff_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_LogonUasLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonUasLogoff_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_LogonUasLogoff_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_LogonUasLogoff_in_get_workstation(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_workstation;
	if (object->in.workstation == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.workstation == NULL) {
		py_workstation = Py_None;
		Py_INCREF(py_workstation);
	} else {
		py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
	}
	return py_workstation;
}

static int py_netr_LogonUasLogoff_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.workstation");
		return -1;
	}
	object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
	if (object->in.workstation == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.workstation = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_LogonUasLogoff_out_get_info(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, object->out.info, object->out.info);
	return py_info;
}

static int py_netr_LogonUasLogoff_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
	if (object->out.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_UasLogoffInfo_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.info = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_LogonUasLogoff_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_LogonUasLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonUasLogoff_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonUasLogoff_in_get_server_name,
		.set = py_netr_LogonUasLogoff_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_LogonUasLogoff_in_get_account_name,
		.set = py_netr_LogonUasLogoff_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_workstation"),
		.get = py_netr_LogonUasLogoff_in_get_workstation,
		.set = py_netr_LogonUasLogoff_in_set_workstation,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_netr_LogonUasLogoff_out_get_info,
		.set = py_netr_LogonUasLogoff_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UasLogoffInfo")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonUasLogoff_get_result,
		.set = py_netr_LogonUasLogoff_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonUasLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonUasLogoff, type);
	struct netr_LogonUasLogoff *_self = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.info = talloc_zero(mem_ctx, struct netr_UasLogoffInfo);
	return self;
}

static PyObject *py_netr_LogonUasLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(1);
}

static PyObject *py_netr_LogonUasLogoff_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 2) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[1];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonUasLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonUasLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonUasLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 2) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[1];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonUasLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonUasLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonUasLogoff_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonUasLogoff *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 2) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[1];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonUasLogoff_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonUasLogoff_ndr_print(py_obj, args, kwargs, "netr_LogonUasLogoff_in", NDR_IN);
}

static PyObject *py_netr_LogonUasLogoff_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonUasLogoff_ndr_print(py_obj, args, kwargs, "netr_LogonUasLogoff_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonUasLogoff_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonUasLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonUasLogoff.opnum() -> 1 (0x01) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonUasLogoff_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonUasLogoff",
	.tp_getset = py_netr_LogonUasLogoff_getsetters,
	.tp_methods = py_netr_LogonUasLogoff_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonUasLogoff_new,
};

static bool pack_py_netr_LogonUasLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogoff *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_workstation;
	const char *kwnames[] = {
		"server_name", "account_name", "workstation", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogoff", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_workstation == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.workstation");
		return false;
	}
	r->in.workstation = talloc_ptrtype(r, r->in.workstation);
	if (r->in.workstation == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_workstation)) {
			unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_workstation)) {
			test_str = PyBytes_AS_STRING(py_workstation);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.workstation = talloc_str;
	}
	return true;
}

static PyObject *unpack_py_netr_LogonUasLogoff_args_out(struct netr_LogonUasLogoff *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, r->out.info, r->out.info);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_info);
	}
	if (result_size == 1) {
		result = py_info;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonSamLogon_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_LogonSamLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		if (object->in.computer_name == NULL) {
			py_computer_name = Py_None;
			Py_INCREF(py_computer_name);
		} else {
			py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
		}
	}
	return py_computer_name;
}

static int py_netr_LogonSamLogon_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.computer_name = NULL;
	} else {
		object->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.computer_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.credential == NULL) {
		py_credential = Py_None;
		Py_INCREF(py_credential);
	} else {
		py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	}
	return py_credential;
}

static int py_netr_LogonSamLogon_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	if (value == Py_None) {
		object->in.credential = NULL;
	} else {
		object->in.credential = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	}
	return py_return_authenticator;
}

static int py_netr_LogonSamLogon_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	if (value == Py_None) {
		object->in.return_authenticator = NULL;
	} else {
		object->in.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	}
	return py_return_authenticator;
}

static int py_netr_LogonSamLogon_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	if (value == Py_None) {
		object->out.return_authenticator = NULL;
	} else {
		object->out.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_in_get_logon_level(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_level;
	py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
	return py_logon_level;
}

static int py_netr_LogonSamLogon_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_in_get_logon(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_logon;
	if (object->in.logon == NULL) {
		Py_RETURN_NONE;
	}
	py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
	if (py_logon == NULL) {
		return NULL;
	}
	return py_logon;
}

static int py_netr_LogonSamLogon_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
		return -1;
	}
	object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
	if (object->in.logon == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_LogonLevel *logon_switch_1;
		logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
		if (logon_switch_1 == NULL) {
			return -1;
		}
		object->in.logon = logon_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_in_get_validation_level(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_validation_level;
	py_validation_level = PyLong_FromLong((uint16_t)(object->in.validation_level));
	return py_validation_level;
}

static int py_netr_LogonSamLogon_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.validation_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.validation_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_out_get_validation(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_validation;
	if (object->out.validation == NULL) {
		Py_RETURN_NONE;
	}
	py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
	if (py_validation == NULL) {
		return NULL;
	}
	return py_validation;
}

static int py_netr_LogonSamLogon_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.validation");
		return -1;
	}
	object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
	if (object->out.validation == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_Validation *validation_switch_1;
		validation_switch_1 = (union netr_Validation *)pyrpc_export_union(&netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->in.validation_level, value, "union netr_Validation");
		if (validation_switch_1 == NULL) {
			return -1;
		}
		object->out.validation = validation_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_out_get_authoritative(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_authoritative;
	if (object->out.authoritative == NULL) {
		Py_RETURN_NONE;
	}
	py_authoritative = PyLong_FromLong((uint16_t)(*object->out.authoritative));
	return py_authoritative;
}

static int py_netr_LogonSamLogon_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.authoritative");
		return -1;
	}
	object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
	if (object->out.authoritative == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.authoritative = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogon_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_LogonSamLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonSamLogon_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonSamLogon_in_get_server_name,
		.set = py_netr_LogonSamLogon_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_LogonSamLogon_in_get_computer_name,
		.set = py_netr_LogonSamLogon_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_LogonSamLogon_in_get_credential,
		.set = py_netr_LogonSamLogon_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_LogonSamLogon_in_get_return_authenticator,
		.set = py_netr_LogonSamLogon_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_LogonSamLogon_out_get_return_authenticator,
		.set = py_netr_LogonSamLogon_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_logon_level"),
		.get = py_netr_LogonSamLogon_in_get_logon_level,
		.set = py_netr_LogonSamLogon_in_set_logon_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
	},
	{
		.name = discard_const_p(char, "in_logon"),
		.get = py_netr_LogonSamLogon_in_get_logon,
		.set = py_netr_LogonSamLogon_in_set_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
	},
	{
		.name = discard_const_p(char, "in_validation_level"),
		.get = py_netr_LogonSamLogon_in_get_validation_level,
		.set = py_netr_LogonSamLogon_in_set_validation_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_validation"),
		.get = py_netr_LogonSamLogon_out_get_validation,
		.set = py_netr_LogonSamLogon_out_set_validation,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
	},
	{
		.name = discard_const_p(char, "out_authoritative"),
		.get = py_netr_LogonSamLogon_out_get_authoritative,
		.set = py_netr_LogonSamLogon_out_set_authoritative,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonSamLogon_get_result,
		.set = py_netr_LogonSamLogon_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonSamLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonSamLogon, type);
	struct netr_LogonSamLogon *_self = (struct netr_LogonSamLogon *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
	_self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
	_self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
	return self;
}

static PyObject *py_netr_LogonSamLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(2);
}

static PyObject *py_netr_LogonSamLogon_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 3) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[2];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonSamLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 3) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[2];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonSamLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogon_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogon *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 3) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[2];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonSamLogon_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogon_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogon_in", NDR_IN);
}

static PyObject *py_netr_LogonSamLogon_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogon_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogon_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonSamLogon_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonSamLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonSamLogon.opnum() -> 2 (0x02) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonSamLogon_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonSamLogon",
	.tp_getset = py_netr_LogonSamLogon_getsetters,
	.tp_methods = py_netr_LogonSamLogon_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonSamLogon_new,
};

static bool pack_py_netr_LogonSamLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogon *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_logon_level;
	PyObject *py_logon;
	PyObject *py_validation_level;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_LogonSamLogon", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_logon_level, &py_logon, &py_validation_level)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	if (py_computer_name == Py_None) {
		r->in.computer_name = NULL;
	} else {
		r->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_computer_name)) {
				unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_computer_name)) {
				test_str = PyBytes_AS_STRING(py_computer_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.computer_name = talloc_str;
		}
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	if (py_credential == Py_None) {
		r->in.credential = NULL;
	} else {
		r->in.credential = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	}
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	if (py_return_authenticator == Py_None) {
		r->in.return_authenticator = NULL;
	} else {
		r->in.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	}
	if (py_logon_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
		if (PyLong_Check(py_logon_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_logon_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_logon == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
		return false;
	}
	r->in.logon = talloc_ptrtype(r, r->in.logon);
	if (r->in.logon == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		union netr_LogonLevel *logon_switch_1;
		logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
		if (logon_switch_1 == NULL) {
			return false;
		}
		r->in.logon = logon_switch_1;
	}
	if (py_validation_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.validation_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
		if (PyLong_Check(py_validation_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_validation_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.validation_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_LogonSamLogon_args_out(struct netr_LogonSamLogon *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_validation = NULL;
	PyObject *py_authoritative = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (r->out.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	}
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
	if (py_validation == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_validation);

	py_authoritative = PyLong_FromLong((uint16_t)(*r->out.authoritative));
	PyTuple_SetItem(result, 2, py_authoritative);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonSamLogoff_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_LogonSamLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogoff_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		if (object->in.computer_name == NULL) {
			py_computer_name = Py_None;
			Py_INCREF(py_computer_name);
		} else {
			py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
		}
	}
	return py_computer_name;
}

static int py_netr_LogonSamLogoff_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.computer_name = NULL;
	} else {
		object->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.computer_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogoff_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.credential == NULL) {
		py_credential = Py_None;
		Py_INCREF(py_credential);
	} else {
		py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	}
	return py_credential;
}

static int py_netr_LogonSamLogoff_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	if (value == Py_None) {
		object->in.credential = NULL;
	} else {
		object->in.credential = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogoff_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	}
	return py_return_authenticator;
}

static int py_netr_LogonSamLogoff_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	if (value == Py_None) {
		object->in.return_authenticator = NULL;
	} else {
		object->in.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogoff_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	}
	return py_return_authenticator;
}

static int py_netr_LogonSamLogoff_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	if (value == Py_None) {
		object->out.return_authenticator = NULL;
	} else {
		object->out.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogoff_in_get_logon_level(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_level;
	py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
	return py_logon_level;
}

static int py_netr_LogonSamLogoff_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogoff_in_get_logon(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_logon;
	py_logon = pyrpc_import_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(obj), object->in.logon_level, &object->in.logon, "union netr_LogonLevel");
	if (py_logon == NULL) {
		return NULL;
	}
	return py_logon;
}

static int py_netr_LogonSamLogoff_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
		return -1;
	}
	{
		union netr_LogonLevel *logon_switch_0;
		logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
		if (logon_switch_0 == NULL) {
			return -1;
		}
		object->in.logon = *logon_switch_0;
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogoff_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_LogonSamLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonSamLogoff_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonSamLogoff_in_get_server_name,
		.set = py_netr_LogonSamLogoff_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_LogonSamLogoff_in_get_computer_name,
		.set = py_netr_LogonSamLogoff_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_LogonSamLogoff_in_get_credential,
		.set = py_netr_LogonSamLogoff_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_LogonSamLogoff_in_get_return_authenticator,
		.set = py_netr_LogonSamLogoff_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_LogonSamLogoff_out_get_return_authenticator,
		.set = py_netr_LogonSamLogoff_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_logon_level"),
		.get = py_netr_LogonSamLogoff_in_get_logon_level,
		.set = py_netr_LogonSamLogoff_in_set_logon_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
	},
	{
		.name = discard_const_p(char, "in_logon"),
		.get = py_netr_LogonSamLogoff_in_get_logon,
		.set = py_netr_LogonSamLogoff_in_set_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonSamLogoff_get_result,
		.set = py_netr_LogonSamLogoff_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonSamLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonSamLogoff, type);
	return self;
}

static PyObject *py_netr_LogonSamLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(3);
}

static PyObject *py_netr_LogonSamLogoff_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 4) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[3];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonSamLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 4) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[3];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonSamLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogoff_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogoff *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 4) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[3];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonSamLogoff_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogoff_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogoff_in", NDR_IN);
}

static PyObject *py_netr_LogonSamLogoff_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogoff_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogoff_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonSamLogoff_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonSamLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonSamLogoff.opnum() -> 3 (0x03) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonSamLogoff_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonSamLogoff",
	.tp_getset = py_netr_LogonSamLogoff_getsetters,
	.tp_methods = py_netr_LogonSamLogoff_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonSamLogoff_new,
};

static bool pack_py_netr_LogonSamLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogoff *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_logon_level;
	PyObject *py_logon;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_LogonSamLogoff", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_logon_level, &py_logon)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	if (py_computer_name == Py_None) {
		r->in.computer_name = NULL;
	} else {
		r->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_computer_name)) {
				unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_computer_name)) {
				test_str = PyBytes_AS_STRING(py_computer_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.computer_name = talloc_str;
		}
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	if (py_credential == Py_None) {
		r->in.credential = NULL;
	} else {
		r->in.credential = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	}
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	if (py_return_authenticator == Py_None) {
		r->in.return_authenticator = NULL;
	} else {
		r->in.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	}
	if (py_logon_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
		if (PyLong_Check(py_logon_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_logon_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_logon == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
		return false;
	}
	{
		union netr_LogonLevel *logon_switch_0;
		logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
		if (logon_switch_0 == NULL) {
			return false;
		}
		r->in.logon = *logon_switch_0;
	}
	return true;
}

static PyObject *unpack_py_netr_LogonSamLogoff_args_out(struct netr_LogonSamLogoff *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (r->out.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_return_authenticator);
	}
	if (result_size == 1) {
		result = py_return_authenticator;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerReqChallenge_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerReqChallenge_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerReqChallenge_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerReqChallenge_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerReqChallenge_in_get_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
	PyObject *py_credentials;
	if (object->in.credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
	return py_credentials;
}

static int py_netr_ServerReqChallenge_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
		return -1;
	}
	object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
	if (object->in.credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerReqChallenge_out_get_return_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
	PyObject *py_return_credentials;
	if (object->out.return_credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
	return py_return_credentials;
}

static int py_netr_ServerReqChallenge_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
		return -1;
	}
	object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
	if (object->out.return_credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerReqChallenge_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerReqChallenge_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerReqChallenge_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerReqChallenge_in_get_server_name,
		.set = py_netr_ServerReqChallenge_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerReqChallenge_in_get_computer_name,
		.set = py_netr_ServerReqChallenge_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credentials"),
		.get = py_netr_ServerReqChallenge_in_get_credentials,
		.set = py_netr_ServerReqChallenge_in_set_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "out_return_credentials"),
		.get = py_netr_ServerReqChallenge_out_get_return_credentials,
		.set = py_netr_ServerReqChallenge_out_set_return_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerReqChallenge_get_result,
		.set = py_netr_ServerReqChallenge_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerReqChallenge_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerReqChallenge, type);
	struct netr_ServerReqChallenge *_self = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
	_self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
	return self;
}

static PyObject *py_netr_ServerReqChallenge_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(4);
}

static PyObject *py_netr_ServerReqChallenge_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 5) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[4];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerReqChallenge_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerReqChallenge_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerReqChallenge_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 5) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[4];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerReqChallenge_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerReqChallenge_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerReqChallenge_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerReqChallenge *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 5) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[4];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerReqChallenge_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerReqChallenge_ndr_print(py_obj, args, kwargs, "netr_ServerReqChallenge_in", NDR_IN);
}

static PyObject *py_netr_ServerReqChallenge_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerReqChallenge_ndr_print(py_obj, args, kwargs, "netr_ServerReqChallenge_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerReqChallenge_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerReqChallenge_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerReqChallenge.opnum() -> 4 (0x04) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerReqChallenge_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerReqChallenge",
	.tp_getset = py_netr_ServerReqChallenge_getsetters,
	.tp_methods = py_netr_ServerReqChallenge_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerReqChallenge_new,
};

static bool pack_py_netr_ServerReqChallenge_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerReqChallenge *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credentials;
	const char *kwnames[] = {
		"server_name", "computer_name", "credentials", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_ServerReqChallenge", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credentials)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credentials == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
		return false;
	}
	r->in.credentials = talloc_ptrtype(r, r->in.credentials);
	if (r->in.credentials == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
	return true;
}

static PyObject *unpack_py_netr_ServerReqChallenge_args_out(struct netr_ServerReqChallenge *r, bool raise_result_exception)
{
	PyObject *py_return_credentials = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_return_credentials);
	}
	if (result_size == 1) {
		result = py_return_credentials;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerAuthenticate_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerAuthenticate_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerAuthenticate_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerAuthenticate_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerAuthenticate_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate_in_get_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
	PyObject *py_credentials;
	if (object->in.credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
	return py_credentials;
}

static int py_netr_ServerAuthenticate_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
		return -1;
	}
	object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
	if (object->in.credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerAuthenticate_out_get_return_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
	PyObject *py_return_credentials;
	if (object->out.return_credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
	return py_return_credentials;
}

static int py_netr_ServerAuthenticate_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
		return -1;
	}
	object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
	if (object->out.return_credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerAuthenticate_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerAuthenticate_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerAuthenticate_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerAuthenticate_in_get_server_name,
		.set = py_netr_ServerAuthenticate_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerAuthenticate_in_get_account_name,
		.set = py_netr_ServerAuthenticate_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerAuthenticate_in_get_secure_channel_type,
		.set = py_netr_ServerAuthenticate_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerAuthenticate_in_get_computer_name,
		.set = py_netr_ServerAuthenticate_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credentials"),
		.get = py_netr_ServerAuthenticate_in_get_credentials,
		.set = py_netr_ServerAuthenticate_in_set_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "out_return_credentials"),
		.get = py_netr_ServerAuthenticate_out_get_return_credentials,
		.set = py_netr_ServerAuthenticate_out_set_return_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerAuthenticate_get_result,
		.set = py_netr_ServerAuthenticate_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerAuthenticate_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerAuthenticate, type);
	struct netr_ServerAuthenticate *_self = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
	_self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
	return self;
}

static PyObject *py_netr_ServerAuthenticate_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(5);
}

static PyObject *py_netr_ServerAuthenticate_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 6) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[5];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerAuthenticate_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticate_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticate_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 6) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[5];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerAuthenticate_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticate_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticate_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 6) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[5];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerAuthenticate_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticate_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticate_in", NDR_IN);
}

static PyObject *py_netr_ServerAuthenticate_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticate_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticate_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerAuthenticate_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerAuthenticate_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerAuthenticate.opnum() -> 5 (0x05) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerAuthenticate_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerAuthenticate",
	.tp_getset = py_netr_ServerAuthenticate_getsetters,
	.tp_methods = py_netr_ServerAuthenticate_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerAuthenticate_new,
};

static bool pack_py_netr_ServerAuthenticate_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credentials;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credentials", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerAuthenticate", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credentials)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credentials == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
		return false;
	}
	r->in.credentials = talloc_ptrtype(r, r->in.credentials);
	if (r->in.credentials == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
	return true;
}

static PyObject *unpack_py_netr_ServerAuthenticate_args_out(struct netr_ServerAuthenticate *r, bool raise_result_exception)
{
	PyObject *py_return_credentials = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_return_credentials);
	}
	if (result_size == 1) {
		result = py_return_credentials;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerPasswordSet_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerPasswordSet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerPasswordSet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerPasswordSet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerPasswordSet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_ServerPasswordSet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordSet_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_ServerPasswordSet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordSet_in_get_new_password(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_new_password;
	if (object->in.new_password == NULL) {
		Py_RETURN_NONE;
	}
	py_new_password = pytalloc_reference_ex(samr_Password_Type, object->in.new_password, object->in.new_password);
	return py_new_password;
}

static int py_netr_ServerPasswordSet_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.new_password");
		return -1;
	}
	object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
	if (object->in.new_password == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.new_password = (struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordSet_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerPasswordSet_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerPasswordSet_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerPasswordSet_in_get_server_name,
		.set = py_netr_ServerPasswordSet_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerPasswordSet_in_get_account_name,
		.set = py_netr_ServerPasswordSet_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerPasswordSet_in_get_secure_channel_type,
		.set = py_netr_ServerPasswordSet_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerPasswordSet_in_get_computer_name,
		.set = py_netr_ServerPasswordSet_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_ServerPasswordSet_in_get_credential,
		.set = py_netr_ServerPasswordSet_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_ServerPasswordSet_out_get_return_authenticator,
		.set = py_netr_ServerPasswordSet_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_new_password"),
		.get = py_netr_ServerPasswordSet_in_get_new_password,
		.set = py_netr_ServerPasswordSet_in_set_new_password,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerPasswordSet_get_result,
		.set = py_netr_ServerPasswordSet_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerPasswordSet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerPasswordSet, type);
	struct netr_ServerPasswordSet *_self = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.new_password = talloc_zero(mem_ctx, struct samr_Password);
	return self;
}

static PyObject *py_netr_ServerPasswordSet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(6);
}

static PyObject *py_netr_ServerPasswordSet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 7) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[6];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerPasswordSet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerPasswordSet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerPasswordSet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 7) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[6];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerPasswordSet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerPasswordSet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerPasswordSet_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordSet *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 7) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[6];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerPasswordSet_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerPasswordSet_ndr_print(py_obj, args, kwargs, "netr_ServerPasswordSet_in", NDR_IN);
}

static PyObject *py_netr_ServerPasswordSet_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerPasswordSet_ndr_print(py_obj, args, kwargs, "netr_ServerPasswordSet_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerPasswordSet_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerPasswordSet_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerPasswordSet.opnum() -> 6 (0x06) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerPasswordSet_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerPasswordSet",
	.tp_getset = py_netr_ServerPasswordSet_getsetters,
	.tp_methods = py_netr_ServerPasswordSet_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerPasswordSet_new,
};

static bool pack_py_netr_ServerPasswordSet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_new_password;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerPasswordSet", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential, &py_new_password)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_new_password == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.new_password");
		return false;
	}
	r->in.new_password = talloc_ptrtype(r, r->in.new_password);
	if (r->in.new_password == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(samr_Password_Type, py_new_password, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.new_password = (struct samr_Password *)pytalloc_get_ptr(py_new_password);
	return true;
}

static PyObject *unpack_py_netr_ServerPasswordSet_args_out(struct netr_ServerPasswordSet *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_return_authenticator);
	}
	if (result_size == 1) {
		result = py_return_authenticator;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DatabaseDeltas_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
	}
	return py_logon_server;
}

static int py_netr_DatabaseDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
	if (object->in.logon_server == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.logon_server = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_in_get_computername(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_computername;
	if (object->in.computername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computername == NULL) {
		py_computername = Py_None;
		Py_INCREF(py_computername);
	} else {
		py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
	}
	return py_computername;
}

static int py_netr_DatabaseDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
		return -1;
	}
	object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
	if (object->in.computername == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computername = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_DatabaseDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_in_get_database_id(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_database_id;
	py_database_id = PyLong_FromUnsignedLongLong((uint32_t)(object->in.database_id));
	return py_database_id;
}

static int py_netr_DatabaseDeltas_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.database_id");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.database_id = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_in_get_sequence_num(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_sequence_num;
	if (object->in.sequence_num == NULL) {
		Py_RETURN_NONE;
	}
	py_sequence_num = PyLong_FromUnsignedLongLong(*object->in.sequence_num);
	return py_sequence_num;
}

static int py_netr_DatabaseDeltas_in_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sequence_num));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sequence_num");
		return -1;
	}
	object->in.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sequence_num);
	if (object->in.sequence_num == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sequence_num));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.sequence_num = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_out_get_sequence_num(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_sequence_num;
	if (object->out.sequence_num == NULL) {
		Py_RETURN_NONE;
	}
	py_sequence_num = PyLong_FromUnsignedLongLong(*object->out.sequence_num);
	return py_sequence_num;
}

static int py_netr_DatabaseDeltas_out_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sequence_num));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.sequence_num");
		return -1;
	}
	object->out.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sequence_num);
	if (object->out.sequence_num == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sequence_num));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.sequence_num = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_out_get_delta_enum_array(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_enum_array;
	if (object->out.delta_enum_array == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
	}
	return py_delta_enum_array;
}

static int py_netr_DatabaseDeltas_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
		return -1;
	}
	object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
	if (object->out.delta_enum_array == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.delta_enum_array = NULL;
	} else {
		*object->out.delta_enum_array = NULL;
		PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_in_get_preferredmaximumlength(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_preferredmaximumlength;
	py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)(object->in.preferredmaximumlength));
	return py_preferredmaximumlength;
}

static int py_netr_DatabaseDeltas_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.preferredmaximumlength");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.preferredmaximumlength = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseDeltas_get_result(PyObject *obj, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_DatabaseDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DatabaseDeltas_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_DatabaseDeltas_in_get_logon_server,
		.set = py_netr_DatabaseDeltas_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computername"),
		.get = py_netr_DatabaseDeltas_in_get_computername,
		.set = py_netr_DatabaseDeltas_in_set_computername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_DatabaseDeltas_in_get_credential,
		.set = py_netr_DatabaseDeltas_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_DatabaseDeltas_in_get_return_authenticator,
		.set = py_netr_DatabaseDeltas_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_DatabaseDeltas_out_get_return_authenticator,
		.set = py_netr_DatabaseDeltas_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_database_id"),
		.get = py_netr_DatabaseDeltas_in_get_database_id,
		.set = py_netr_DatabaseDeltas_in_set_database_id,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
	},
	{
		.name = discard_const_p(char, "in_sequence_num"),
		.get = py_netr_DatabaseDeltas_in_get_sequence_num,
		.set = py_netr_DatabaseDeltas_in_set_sequence_num,
		.doc = discard_const_p(char, "PIDL-generated element of base type udlong")
	},
	{
		.name = discard_const_p(char, "out_sequence_num"),
		.get = py_netr_DatabaseDeltas_out_get_sequence_num,
		.set = py_netr_DatabaseDeltas_out_set_sequence_num,
		.doc = discard_const_p(char, "PIDL-generated element of base type udlong")
	},
	{
		.name = discard_const_p(char, "out_delta_enum_array"),
		.get = py_netr_DatabaseDeltas_out_get_delta_enum_array,
		.set = py_netr_DatabaseDeltas_out_set_delta_enum_array,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
	},
	{
		.name = discard_const_p(char, "in_preferredmaximumlength"),
		.get = py_netr_DatabaseDeltas_in_get_preferredmaximumlength,
		.set = py_netr_DatabaseDeltas_in_set_preferredmaximumlength,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DatabaseDeltas_get_result,
		.set = py_netr_DatabaseDeltas_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DatabaseDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DatabaseDeltas, type);
	struct netr_DatabaseDeltas *_self = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.sequence_num = talloc_zero(mem_ctx, uint64_t);
	_self->out.sequence_num = talloc_zero(mem_ctx, uint64_t);
	/* a pointer to a NULL pointer */
	_self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
	return self;
}

static PyObject *py_netr_DatabaseDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(7);
}

static PyObject *py_netr_DatabaseDeltas_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 8) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[7];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DatabaseDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DatabaseDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DatabaseDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 8) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[7];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DatabaseDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseDeltas_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseDeltas *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 8) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[7];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DatabaseDeltas_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseDeltas_ndr_print(py_obj, args, kwargs, "netr_DatabaseDeltas_in", NDR_IN);
}

static PyObject *py_netr_DatabaseDeltas_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseDeltas_ndr_print(py_obj, args, kwargs, "netr_DatabaseDeltas_out", NDR_OUT);
}

static PyMethodDef py_netr_DatabaseDeltas_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DatabaseDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DatabaseDeltas.opnum() -> 7 (0x07) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DatabaseDeltas_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DatabaseDeltas",
	.tp_getset = py_netr_DatabaseDeltas_getsetters,
	.tp_methods = py_netr_DatabaseDeltas_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DatabaseDeltas_new,
};

static bool pack_py_netr_DatabaseDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseDeltas *r)
{
	PyObject *py_logon_server;
	PyObject *py_computername;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_database_id;
	PyObject *py_sequence_num;
	PyObject *py_preferredmaximumlength;
	const char *kwnames[] = {
		"logon_server", "computername", "credential", "return_authenticator", "database_id", "sequence_num", "preferredmaximumlength", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_DatabaseDeltas", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_database_id, &py_sequence_num, &py_preferredmaximumlength)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
	if (r->in.logon_server == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_logon_server)) {
			unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_logon_server)) {
			test_str = PyBytes_AS_STRING(py_logon_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.logon_server = talloc_str;
	}
	if (py_computername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
		return false;
	}
	r->in.computername = talloc_ptrtype(r, r->in.computername);
	if (r->in.computername == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computername)) {
			unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computername)) {
			test_str = PyBytes_AS_STRING(py_computername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computername = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_database_id == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.database_id");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
		if (PyLong_Check(py_database_id)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_database_id);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.database_id = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_sequence_num == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sequence_num");
		return false;
	}
	r->in.sequence_num = talloc_ptrtype(r, r->in.sequence_num);
	if (r->in.sequence_num == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sequence_num));
		if (PyLong_Check(py_sequence_num)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_sequence_num);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.sequence_num = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_preferredmaximumlength == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.preferredmaximumlength");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
		if (PyLong_Check(py_preferredmaximumlength)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.preferredmaximumlength = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DatabaseDeltas_args_out(struct netr_DatabaseDeltas *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_sequence_num = NULL;
	PyObject *py_delta_enum_array = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_sequence_num = PyLong_FromUnsignedLongLong(*r->out.sequence_num);
	PyTuple_SetItem(result, 1, py_sequence_num);

	if (*r->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
	}
	PyTuple_SetItem(result, 2, py_delta_enum_array);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DatabaseSync_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
	}
	return py_logon_server;
}

static int py_netr_DatabaseSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
	if (object->in.logon_server == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.logon_server = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync_in_get_computername(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_computername;
	if (object->in.computername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computername == NULL) {
		py_computername = Py_None;
		Py_INCREF(py_computername);
	} else {
		py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
	}
	return py_computername;
}

static int py_netr_DatabaseSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
		return -1;
	}
	object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
	if (object->in.computername == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computername = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_DatabaseSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseSync_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseSync_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseSync_in_get_database_id(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_database_id;
	py_database_id = PyLong_FromUnsignedLongLong((uint32_t)(object->in.database_id));
	return py_database_id;
}

static int py_netr_DatabaseSync_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.database_id");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.database_id = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync_in_get_sync_context(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_sync_context;
	if (object->in.sync_context == NULL) {
		Py_RETURN_NONE;
	}
	py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.sync_context));
	return py_sync_context;
}

static int py_netr_DatabaseSync_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sync_context");
		return -1;
	}
	object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
	if (object->in.sync_context == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.sync_context = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync_out_get_sync_context(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_sync_context;
	if (object->out.sync_context == NULL) {
		Py_RETURN_NONE;
	}
	py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.sync_context));
	return py_sync_context;
}

static int py_netr_DatabaseSync_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.sync_context");
		return -1;
	}
	object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
	if (object->out.sync_context == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.sync_context = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync_out_get_delta_enum_array(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_enum_array;
	if (object->out.delta_enum_array == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
	}
	return py_delta_enum_array;
}

static int py_netr_DatabaseSync_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
		return -1;
	}
	object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
	if (object->out.delta_enum_array == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.delta_enum_array = NULL;
	} else {
		*object->out.delta_enum_array = NULL;
		PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync_in_get_preferredmaximumlength(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_preferredmaximumlength;
	py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)(object->in.preferredmaximumlength));
	return py_preferredmaximumlength;
}

static int py_netr_DatabaseSync_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.preferredmaximumlength");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.preferredmaximumlength = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync_get_result(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_DatabaseSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DatabaseSync_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_DatabaseSync_in_get_logon_server,
		.set = py_netr_DatabaseSync_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computername"),
		.get = py_netr_DatabaseSync_in_get_computername,
		.set = py_netr_DatabaseSync_in_set_computername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_DatabaseSync_in_get_credential,
		.set = py_netr_DatabaseSync_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_DatabaseSync_in_get_return_authenticator,
		.set = py_netr_DatabaseSync_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_DatabaseSync_out_get_return_authenticator,
		.set = py_netr_DatabaseSync_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_database_id"),
		.get = py_netr_DatabaseSync_in_get_database_id,
		.set = py_netr_DatabaseSync_in_set_database_id,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
	},
	{
		.name = discard_const_p(char, "in_sync_context"),
		.get = py_netr_DatabaseSync_in_get_sync_context,
		.set = py_netr_DatabaseSync_in_set_sync_context,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_sync_context"),
		.get = py_netr_DatabaseSync_out_get_sync_context,
		.set = py_netr_DatabaseSync_out_set_sync_context,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_delta_enum_array"),
		.get = py_netr_DatabaseSync_out_get_delta_enum_array,
		.set = py_netr_DatabaseSync_out_set_delta_enum_array,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
	},
	{
		.name = discard_const_p(char, "in_preferredmaximumlength"),
		.get = py_netr_DatabaseSync_in_get_preferredmaximumlength,
		.set = py_netr_DatabaseSync_in_set_preferredmaximumlength,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DatabaseSync_get_result,
		.set = py_netr_DatabaseSync_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DatabaseSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DatabaseSync, type);
	struct netr_DatabaseSync *_self = (struct netr_DatabaseSync *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
	_self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
	/* a pointer to a NULL pointer */
	_self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
	return self;
}

static PyObject *py_netr_DatabaseSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(8);
}

static PyObject *py_netr_DatabaseSync_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 9) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[8];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DatabaseSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DatabaseSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DatabaseSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 9) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[8];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DatabaseSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseSync_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseSync *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 9) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[8];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DatabaseSync_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseSync_ndr_print(py_obj, args, kwargs, "netr_DatabaseSync_in", NDR_IN);
}

static PyObject *py_netr_DatabaseSync_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseSync_ndr_print(py_obj, args, kwargs, "netr_DatabaseSync_out", NDR_OUT);
}

static PyMethodDef py_netr_DatabaseSync_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DatabaseSync_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DatabaseSync.opnum() -> 8 (0x08) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DatabaseSync_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DatabaseSync",
	.tp_getset = py_netr_DatabaseSync_getsetters,
	.tp_methods = py_netr_DatabaseSync_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DatabaseSync_new,
};

static bool pack_py_netr_DatabaseSync_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync *r)
{
	PyObject *py_logon_server;
	PyObject *py_computername;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_database_id;
	PyObject *py_sync_context;
	PyObject *py_preferredmaximumlength;
	const char *kwnames[] = {
		"logon_server", "computername", "credential", "return_authenticator", "database_id", "sync_context", "preferredmaximumlength", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_DatabaseSync", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_database_id, &py_sync_context, &py_preferredmaximumlength)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
	if (r->in.logon_server == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_logon_server)) {
			unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_logon_server)) {
			test_str = PyBytes_AS_STRING(py_logon_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.logon_server = talloc_str;
	}
	if (py_computername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
		return false;
	}
	r->in.computername = talloc_ptrtype(r, r->in.computername);
	if (r->in.computername == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computername)) {
			unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computername)) {
			test_str = PyBytes_AS_STRING(py_computername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computername = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_database_id == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.database_id");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
		if (PyLong_Check(py_database_id)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_database_id);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.database_id = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_sync_context == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sync_context");
		return false;
	}
	r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
	if (r->in.sync_context == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
		if (PyLong_Check(py_sync_context)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_sync_context);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.sync_context = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_preferredmaximumlength == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.preferredmaximumlength");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
		if (PyLong_Check(py_preferredmaximumlength)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.preferredmaximumlength = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DatabaseSync_args_out(struct netr_DatabaseSync *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_sync_context = NULL;
	PyObject *py_delta_enum_array = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.sync_context));
	PyTuple_SetItem(result, 1, py_sync_context);

	if (*r->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
	}
	PyTuple_SetItem(result, 2, py_delta_enum_array);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_AccountDeltas_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		if (object->in.logon_server == NULL) {
			py_logon_server = Py_None;
			Py_INCREF(py_logon_server);
		} else {
			py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
		}
	}
	return py_logon_server;
}

static int py_netr_AccountDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	if (value == Py_None) {
		object->in.logon_server = NULL;
	} else {
		object->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.logon_server = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountDeltas_in_get_computername(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_computername;
	if (object->in.computername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computername == NULL) {
		py_computername = Py_None;
		Py_INCREF(py_computername);
	} else {
		py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
	}
	return py_computername;
}

static int py_netr_AccountDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
		return -1;
	}
	object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
	if (object->in.computername == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computername = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_AccountDeltas_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
	return py_credential;
}

static int py_netr_AccountDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_AccountDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_AccountDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountDeltas_in_get_uas(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_uas;
	py_uas = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, pytalloc_get_mem_ctx(obj), &object->in.uas);
	return py_uas;
}

static int py_netr_AccountDeltas_in_set_uas(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.uas");
		return -1;
	}
	PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountDeltas_in_get_count(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->in.count));
	return py_count;
}

static int py_netr_AccountDeltas_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountDeltas_in_get_level(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_netr_AccountDeltas_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountDeltas_in_get_buffersize(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_buffersize;
	py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)(object->in.buffersize));
	return py_buffersize;
}

static int py_netr_AccountDeltas_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.buffersize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.buffersize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountDeltas_out_get_buffer(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_buffer;
	if (object->out.buffer == NULL) {
		Py_RETURN_NONE;
	}
	py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
	return py_buffer;
}

static int py_netr_AccountDeltas_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.buffer");
		return -1;
	}
	object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
	if (object->out.buffer == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountDeltas_out_get_count_returned(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_count_returned;
	if (object->out.count_returned == NULL) {
		Py_RETURN_NONE;
	}
	py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.count_returned));
	return py_count_returned;
}

static int py_netr_AccountDeltas_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.count_returned");
		return -1;
	}
	object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
	if (object->out.count_returned == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.count_returned = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountDeltas_out_get_total_entries(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_total_entries;
	if (object->out.total_entries == NULL) {
		Py_RETURN_NONE;
	}
	py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.total_entries));
	return py_total_entries;
}

static int py_netr_AccountDeltas_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.total_entries");
		return -1;
	}
	object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
	if (object->out.total_entries == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.total_entries = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountDeltas_out_get_recordid(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_recordid;
	if (object->out.recordid == NULL) {
		Py_RETURN_NONE;
	}
	py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
	return py_recordid;
}

static int py_netr_AccountDeltas_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.recordid");
		return -1;
	}
	object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
	if (object->out.recordid == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountDeltas_get_result(PyObject *obj, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_AccountDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_AccountDeltas_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_AccountDeltas_in_get_logon_server,
		.set = py_netr_AccountDeltas_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computername"),
		.get = py_netr_AccountDeltas_in_get_computername,
		.set = py_netr_AccountDeltas_in_set_computername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_AccountDeltas_in_get_credential,
		.set = py_netr_AccountDeltas_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_AccountDeltas_in_get_return_authenticator,
		.set = py_netr_AccountDeltas_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_AccountDeltas_out_get_return_authenticator,
		.set = py_netr_AccountDeltas_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_uas"),
		.get = py_netr_AccountDeltas_in_get_uas,
		.set = py_netr_AccountDeltas_in_set_uas,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
	},
	{
		.name = discard_const_p(char, "in_count"),
		.get = py_netr_AccountDeltas_in_get_count,
		.set = py_netr_AccountDeltas_in_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_netr_AccountDeltas_in_get_level,
		.set = py_netr_AccountDeltas_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_buffersize"),
		.get = py_netr_AccountDeltas_in_get_buffersize,
		.set = py_netr_AccountDeltas_in_set_buffersize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_buffer"),
		.get = py_netr_AccountDeltas_out_get_buffer,
		.set = py_netr_AccountDeltas_out_set_buffer,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
	},
	{
		.name = discard_const_p(char, "out_count_returned"),
		.get = py_netr_AccountDeltas_out_get_count_returned,
		.set = py_netr_AccountDeltas_out_set_count_returned,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_total_entries"),
		.get = py_netr_AccountDeltas_out_get_total_entries,
		.set = py_netr_AccountDeltas_out_set_total_entries,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_recordid"),
		.get = py_netr_AccountDeltas_out_get_recordid,
		.set = py_netr_AccountDeltas_out_set_recordid,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_AccountDeltas_get_result,
		.set = py_netr_AccountDeltas_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_AccountDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_AccountDeltas, type);
	struct netr_AccountDeltas *_self = (struct netr_AccountDeltas *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
	_self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
	_self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
	_self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
	return self;
}

static PyObject *py_netr_AccountDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(9);
}

static PyObject *py_netr_AccountDeltas_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 10) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[9];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_AccountDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_AccountDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_AccountDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 10) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[9];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_AccountDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_AccountDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_AccountDeltas_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_AccountDeltas *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 10) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[9];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_AccountDeltas_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_AccountDeltas_ndr_print(py_obj, args, kwargs, "netr_AccountDeltas_in", NDR_IN);
}

static PyObject *py_netr_AccountDeltas_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_AccountDeltas_ndr_print(py_obj, args, kwargs, "netr_AccountDeltas_out", NDR_OUT);
}

static PyMethodDef py_netr_AccountDeltas_methods[] = {
	{ "opnum", (PyCFunction)py_netr_AccountDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_AccountDeltas.opnum() -> 9 (0x09) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_AccountDeltas_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_AccountDeltas",
	.tp_getset = py_netr_AccountDeltas_getsetters,
	.tp_methods = py_netr_AccountDeltas_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_AccountDeltas_new,
};

static bool pack_py_netr_AccountDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountDeltas *r)
{
	PyObject *py_logon_server;
	PyObject *py_computername;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_uas;
	PyObject *py_count;
	PyObject *py_level;
	PyObject *py_buffersize;
	const char *kwnames[] = {
		"logon_server", "computername", "credential", "return_authenticator", "uas", "count", "level", "buffersize", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_AccountDeltas", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_uas, &py_count, &py_level, &py_buffersize)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	if (py_logon_server == Py_None) {
		r->in.logon_server = NULL;
	} else {
		r->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_logon_server)) {
				unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_logon_server)) {
				test_str = PyBytes_AS_STRING(py_logon_server);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.logon_server = talloc_str;
		}
	}
	if (py_computername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
		return false;
	}
	r->in.computername = talloc_ptrtype(r, r->in.computername);
	if (r->in.computername == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computername)) {
			unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computername)) {
			test_str = PyBytes_AS_STRING(py_computername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computername = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_uas == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.uas");
		return false;
	}
	PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_uas, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_uas)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_uas);
	if (py_count == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.count");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.count));
		if (PyLong_Check(py_count)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_count);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_buffersize == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.buffersize");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
		if (PyLong_Check(py_buffersize)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_buffersize);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.buffersize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_AccountDeltas_args_out(struct netr_AccountDeltas *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_buffer = NULL;
	PyObject *py_count_returned = NULL;
	PyObject *py_total_entries = NULL;
	PyObject *py_recordid = NULL;
	PyObject *result = NULL;
	size_t result_size = 5;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
	PyTuple_SetItem(result, 1, py_buffer);

	py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.count_returned));
	PyTuple_SetItem(result, 2, py_count_returned);

	py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.total_entries));
	PyTuple_SetItem(result, 3, py_total_entries);

	py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
	PyTuple_SetItem(result, 4, py_recordid);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 5, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_AccountSync_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		if (object->in.logon_server == NULL) {
			py_logon_server = Py_None;
			Py_INCREF(py_logon_server);
		} else {
			py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
		}
	}
	return py_logon_server;
}

static int py_netr_AccountSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	if (value == Py_None) {
		object->in.logon_server = NULL;
	} else {
		object->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.logon_server = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountSync_in_get_computername(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_computername;
	if (object->in.computername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computername == NULL) {
		py_computername = Py_None;
		Py_INCREF(py_computername);
	} else {
		py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
	}
	return py_computername;
}

static int py_netr_AccountSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
		return -1;
	}
	object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
	if (object->in.computername == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computername = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_AccountSync_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
	return py_credential;
}

static int py_netr_AccountSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountSync_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_AccountSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountSync_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_AccountSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountSync_in_get_reference(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_reference;
	py_reference = PyLong_FromUnsignedLongLong((uint32_t)(object->in.reference));
	return py_reference;
}

static int py_netr_AccountSync_in_set_reference(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.reference");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reference));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.reference = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountSync_in_get_level(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_netr_AccountSync_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountSync_in_get_buffersize(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_buffersize;
	py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)(object->in.buffersize));
	return py_buffersize;
}

static int py_netr_AccountSync_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.buffersize");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.buffersize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountSync_out_get_buffer(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_buffer;
	if (object->out.buffer == NULL) {
		Py_RETURN_NONE;
	}
	py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
	return py_buffer;
}

static int py_netr_AccountSync_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.buffer");
		return -1;
	}
	object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
	if (object->out.buffer == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountSync_out_get_count_returned(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_count_returned;
	if (object->out.count_returned == NULL) {
		Py_RETURN_NONE;
	}
	py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.count_returned));
	return py_count_returned;
}

static int py_netr_AccountSync_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.count_returned");
		return -1;
	}
	object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
	if (object->out.count_returned == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.count_returned = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountSync_out_get_total_entries(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_total_entries;
	if (object->out.total_entries == NULL) {
		Py_RETURN_NONE;
	}
	py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.total_entries));
	return py_total_entries;
}

static int py_netr_AccountSync_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.total_entries");
		return -1;
	}
	object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
	if (object->out.total_entries == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.total_entries = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountSync_out_get_next_reference(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_next_reference;
	if (object->out.next_reference == NULL) {
		Py_RETURN_NONE;
	}
	py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.next_reference));
	return py_next_reference;
}

static int py_netr_AccountSync_out_set_next_reference(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.next_reference));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.next_reference");
		return -1;
	}
	object->out.next_reference = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.next_reference);
	if (object->out.next_reference == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.next_reference));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.next_reference = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_AccountSync_in_get_recordid(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_recordid;
	if (object->in.recordid == NULL) {
		Py_RETURN_NONE;
	}
	py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->in.recordid, object->in.recordid);
	return py_recordid;
}

static int py_netr_AccountSync_in_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.recordid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.recordid");
		return -1;
	}
	object->in.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.recordid);
	if (object->in.recordid == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountSync_out_get_recordid(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_recordid;
	if (object->out.recordid == NULL) {
		Py_RETURN_NONE;
	}
	py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
	return py_recordid;
}

static int py_netr_AccountSync_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.recordid");
		return -1;
	}
	object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
	if (object->out.recordid == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_AccountSync_get_result(PyObject *obj, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_AccountSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_AccountSync_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_AccountSync_in_get_logon_server,
		.set = py_netr_AccountSync_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computername"),
		.get = py_netr_AccountSync_in_get_computername,
		.set = py_netr_AccountSync_in_set_computername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_AccountSync_in_get_credential,
		.set = py_netr_AccountSync_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_AccountSync_in_get_return_authenticator,
		.set = py_netr_AccountSync_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_AccountSync_out_get_return_authenticator,
		.set = py_netr_AccountSync_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_reference"),
		.get = py_netr_AccountSync_in_get_reference,
		.set = py_netr_AccountSync_in_set_reference,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_netr_AccountSync_in_get_level,
		.set = py_netr_AccountSync_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_buffersize"),
		.get = py_netr_AccountSync_in_get_buffersize,
		.set = py_netr_AccountSync_in_set_buffersize,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_buffer"),
		.get = py_netr_AccountSync_out_get_buffer,
		.set = py_netr_AccountSync_out_set_buffer,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
	},
	{
		.name = discard_const_p(char, "out_count_returned"),
		.get = py_netr_AccountSync_out_get_count_returned,
		.set = py_netr_AccountSync_out_set_count_returned,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_total_entries"),
		.get = py_netr_AccountSync_out_get_total_entries,
		.set = py_netr_AccountSync_out_set_total_entries,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_next_reference"),
		.get = py_netr_AccountSync_out_get_next_reference,
		.set = py_netr_AccountSync_out_set_next_reference,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_recordid"),
		.get = py_netr_AccountSync_in_get_recordid,
		.set = py_netr_AccountSync_in_set_recordid,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
	},
	{
		.name = discard_const_p(char, "out_recordid"),
		.get = py_netr_AccountSync_out_get_recordid,
		.set = py_netr_AccountSync_out_set_recordid,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_AccountSync_get_result,
		.set = py_netr_AccountSync_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_AccountSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_AccountSync, type);
	struct netr_AccountSync *_self = (struct netr_AccountSync *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
	_self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
	_self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
	_self->out.next_reference = talloc_zero(mem_ctx, uint32_t);
	_self->in.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
	_self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
	return self;
}

static PyObject *py_netr_AccountSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(10);
}

static PyObject *py_netr_AccountSync_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 11) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[10];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_AccountSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_AccountSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_AccountSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_AccountSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_AccountSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 11) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[10];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_AccountSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_AccountSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_AccountSync_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_AccountSync *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 11) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[10];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_AccountSync_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_AccountSync_ndr_print(py_obj, args, kwargs, "netr_AccountSync_in", NDR_IN);
}

static PyObject *py_netr_AccountSync_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_AccountSync_ndr_print(py_obj, args, kwargs, "netr_AccountSync_out", NDR_OUT);
}

static PyMethodDef py_netr_AccountSync_methods[] = {
	{ "opnum", (PyCFunction)py_netr_AccountSync_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_AccountSync.opnum() -> 10 (0x0a) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_AccountSync_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_AccountSync",
	.tp_getset = py_netr_AccountSync_getsetters,
	.tp_methods = py_netr_AccountSync_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_AccountSync_new,
};

static bool pack_py_netr_AccountSync_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountSync *r)
{
	PyObject *py_logon_server;
	PyObject *py_computername;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_reference;
	PyObject *py_level;
	PyObject *py_buffersize;
	PyObject *py_recordid;
	const char *kwnames[] = {
		"logon_server", "computername", "credential", "return_authenticator", "reference", "level", "buffersize", "recordid", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_AccountSync", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_reference, &py_level, &py_buffersize, &py_recordid)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	if (py_logon_server == Py_None) {
		r->in.logon_server = NULL;
	} else {
		r->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_logon_server)) {
				unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_logon_server)) {
				test_str = PyBytes_AS_STRING(py_logon_server);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.logon_server = talloc_str;
		}
	}
	if (py_computername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
		return false;
	}
	r->in.computername = talloc_ptrtype(r, r->in.computername);
	if (r->in.computername == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computername)) {
			unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computername)) {
			test_str = PyBytes_AS_STRING(py_computername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computername = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_reference == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.reference");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reference));
		if (PyLong_Check(py_reference)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_reference);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.reference = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_buffersize == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.buffersize");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
		if (PyLong_Check(py_buffersize)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_buffersize);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.buffersize = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_recordid == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.recordid");
		return false;
	}
	r->in.recordid = talloc_ptrtype(r, r->in.recordid);
	if (r->in.recordid == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_recordid, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_recordid)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_recordid);
	return true;
}

static PyObject *unpack_py_netr_AccountSync_args_out(struct netr_AccountSync *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_buffer = NULL;
	PyObject *py_count_returned = NULL;
	PyObject *py_total_entries = NULL;
	PyObject *py_next_reference = NULL;
	PyObject *py_recordid = NULL;
	PyObject *result = NULL;
	size_t result_size = 6;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
	PyTuple_SetItem(result, 1, py_buffer);

	py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.count_returned));
	PyTuple_SetItem(result, 2, py_count_returned);

	py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.total_entries));
	PyTuple_SetItem(result, 3, py_total_entries);

	py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.next_reference));
	PyTuple_SetItem(result, 4, py_next_reference);

	py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
	PyTuple_SetItem(result, 5, py_recordid);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 6, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_GetDcName_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
	}
	return py_logon_server;
}

static int py_netr_GetDcName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
	if (object->in.logon_server == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.logon_server = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_GetDcName_in_get_domainname(PyObject *obj, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(obj);
	PyObject *py_domainname;
	if (object->in.domainname == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domainname == NULL) {
		py_domainname = Py_None;
		Py_INCREF(py_domainname);
	} else {
		if (object->in.domainname == NULL) {
			py_domainname = Py_None;
			Py_INCREF(py_domainname);
		} else {
			py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
		}
	}
	return py_domainname;
}

static int py_netr_GetDcName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domainname");
		return -1;
	}
	if (value == Py_None) {
		object->in.domainname = NULL;
	} else {
		object->in.domainname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.domainname = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_GetDcName_out_get_dcname(PyObject *obj, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(obj);
	PyObject *py_dcname;
	if (object->out.dcname == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.dcname == NULL) {
		py_dcname = Py_None;
		Py_INCREF(py_dcname);
	} else {
		if (*object->out.dcname == NULL) {
			py_dcname = Py_None;
			Py_INCREF(py_dcname);
		} else {
			py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
		}
	}
	return py_dcname;
}

static int py_netr_GetDcName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dcname");
		return -1;
	}
	object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
	if (object->out.dcname == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.dcname = NULL;
	} else {
		*object->out.dcname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->out.dcname = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_GetDcName_get_result(PyObject *obj, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_GetDcName_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_GetDcName_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_GetDcName_in_get_logon_server,
		.set = py_netr_GetDcName_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domainname"),
		.get = py_netr_GetDcName_in_get_domainname,
		.set = py_netr_GetDcName_in_set_domainname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_dcname"),
		.get = py_netr_GetDcName_out_get_dcname,
		.set = py_netr_GetDcName_out_set_dcname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_GetDcName_get_result,
		.set = py_netr_GetDcName_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_GetDcName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_GetDcName, type);
	return self;
}

static PyObject *py_netr_GetDcName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(11);
}

static PyObject *py_netr_GetDcName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 12) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[11];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_GetDcName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_GetDcName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_GetDcName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_GetDcName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_GetDcName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 12) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[11];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_GetDcName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_GetDcName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_GetDcName_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetDcName *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 12) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[11];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_GetDcName_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_GetDcName_ndr_print(py_obj, args, kwargs, "netr_GetDcName_in", NDR_IN);
}

static PyObject *py_netr_GetDcName_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_GetDcName_ndr_print(py_obj, args, kwargs, "netr_GetDcName_out", NDR_OUT);
}

static PyMethodDef py_netr_GetDcName_methods[] = {
	{ "opnum", (PyCFunction)py_netr_GetDcName_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_GetDcName.opnum() -> 11 (0x0b) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_GetDcName_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_GetDcName",
	.tp_getset = py_netr_GetDcName_getsetters,
	.tp_methods = py_netr_GetDcName_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_GetDcName_new,
};

static bool pack_py_netr_GetDcName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetDcName *r)
{
	PyObject *py_logon_server;
	PyObject *py_domainname;
	const char *kwnames[] = {
		"logon_server", "domainname", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetDcName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
	if (r->in.logon_server == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_logon_server)) {
			unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_logon_server)) {
			test_str = PyBytes_AS_STRING(py_logon_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.logon_server = talloc_str;
	}
	if (py_domainname == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domainname");
		return false;
	}
	if (py_domainname == Py_None) {
		r->in.domainname = NULL;
	} else {
		r->in.domainname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_domainname)) {
				unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_domainname)) {
				test_str = PyBytes_AS_STRING(py_domainname);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.domainname = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_GetDcName_args_out(struct netr_GetDcName *r, bool raise_result_exception)
{
	PyObject *py_dcname = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.dcname == NULL) {
		py_dcname = Py_None;
		Py_INCREF(py_dcname);
	} else {
		if (*r->out.dcname == NULL) {
			py_dcname = Py_None;
			Py_INCREF(py_dcname);
		} else {
			py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
		}
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_dcname);
	}
	if (result_size == 1) {
		result = py_dcname;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonControl_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		if (object->in.logon_server == NULL) {
			py_logon_server = Py_None;
			Py_INCREF(py_logon_server);
		} else {
			py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
		}
	}
	return py_logon_server;
}

static int py_netr_LogonControl_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	if (value == Py_None) {
		object->in.logon_server = NULL;
	} else {
		object->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.logon_server = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl_in_get_function_code(PyObject *obj, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(obj);
	PyObject *py_function_code;
	py_function_code = PyLong_FromUnsignedLongLong((uint32_t)(object->in.function_code));
	return py_function_code;
}

static int py_netr_LogonControl_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.function_code");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.function_code = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl_in_get_level(PyObject *obj, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_netr_LogonControl_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl_out_get_query(PyObject *obj, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(obj);
	PyObject *py_query;
	if (object->out.query == NULL) {
		Py_RETURN_NONE;
	}
	py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, object->out.query, object->in.level, object->out.query, "union netr_CONTROL_QUERY_INFORMATION");
	if (py_query == NULL) {
		return NULL;
	}
	return py_query;
}

static int py_netr_LogonControl_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.query");
		return -1;
	}
	object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
	if (object->out.query == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
		query_switch_1 = (union netr_CONTROL_QUERY_INFORMATION *)pyrpc_export_union(&netr_CONTROL_QUERY_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_CONTROL_QUERY_INFORMATION");
		if (query_switch_1 == NULL) {
			return -1;
		}
		object->out.query = query_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonControl_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_LogonControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonControl_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_LogonControl_in_get_logon_server,
		.set = py_netr_LogonControl_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_function_code"),
		.get = py_netr_LogonControl_in_get_function_code,
		.set = py_netr_LogonControl_in_set_function_code,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_netr_LogonControl_in_get_level,
		.set = py_netr_LogonControl_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_query"),
		.get = py_netr_LogonControl_out_get_query,
		.set = py_netr_LogonControl_out_set_query,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonControl_get_result,
		.set = py_netr_LogonControl_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonControl, type);
	struct netr_LogonControl *_self = (struct netr_LogonControl *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
	return self;
}

static PyObject *py_netr_LogonControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(12);
}

static PyObject *py_netr_LogonControl_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 13) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[12];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 13) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[12];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonControl_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 13) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[12];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonControl_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonControl_ndr_print(py_obj, args, kwargs, "netr_LogonControl_in", NDR_IN);
}

static PyObject *py_netr_LogonControl_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonControl_ndr_print(py_obj, args, kwargs, "netr_LogonControl_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonControl_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonControl_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonControl.opnum() -> 12 (0x0c) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonControl_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonControl",
	.tp_getset = py_netr_LogonControl_getsetters,
	.tp_methods = py_netr_LogonControl_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonControl_new,
};

static bool pack_py_netr_LogonControl_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl *r)
{
	PyObject *py_logon_server;
	PyObject *py_function_code;
	PyObject *py_level;
	const char *kwnames[] = {
		"logon_server", "function_code", "level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonControl", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	if (py_logon_server == Py_None) {
		r->in.logon_server = NULL;
	} else {
		r->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_logon_server)) {
				unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_logon_server)) {
				test_str = PyBytes_AS_STRING(py_logon_server);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.logon_server = talloc_str;
		}
	}
	if (py_function_code == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.function_code");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
		if (PyLong_Check(py_function_code)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_function_code);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.function_code = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_LogonControl_args_out(struct netr_LogonControl *r, bool raise_result_exception)
{
	PyObject *py_query = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, r->out.query, r->in.level, r->out.query, "union netr_CONTROL_QUERY_INFORMATION");
	if (py_query == NULL) {
		return NULL;
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_query);
	}
	if (result_size == 1) {
		result = py_query;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_GetAnyDCName_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		if (object->in.logon_server == NULL) {
			py_logon_server = Py_None;
			Py_INCREF(py_logon_server);
		} else {
			py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
		}
	}
	return py_logon_server;
}

static int py_netr_GetAnyDCName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	if (value == Py_None) {
		object->in.logon_server = NULL;
	} else {
		object->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.logon_server = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_GetAnyDCName_in_get_domainname(PyObject *obj, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_domainname;
	if (object->in.domainname == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domainname == NULL) {
		py_domainname = Py_None;
		Py_INCREF(py_domainname);
	} else {
		if (object->in.domainname == NULL) {
			py_domainname = Py_None;
			Py_INCREF(py_domainname);
		} else {
			py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
		}
	}
	return py_domainname;
}

static int py_netr_GetAnyDCName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domainname");
		return -1;
	}
	if (value == Py_None) {
		object->in.domainname = NULL;
	} else {
		object->in.domainname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.domainname = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_GetAnyDCName_out_get_dcname(PyObject *obj, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_dcname;
	if (object->out.dcname == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.dcname == NULL) {
		py_dcname = Py_None;
		Py_INCREF(py_dcname);
	} else {
		if (*object->out.dcname == NULL) {
			py_dcname = Py_None;
			Py_INCREF(py_dcname);
		} else {
			py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
		}
	}
	return py_dcname;
}

static int py_netr_GetAnyDCName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dcname");
		return -1;
	}
	object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
	if (object->out.dcname == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.dcname = NULL;
	} else {
		*object->out.dcname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->out.dcname = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_GetAnyDCName_get_result(PyObject *obj, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_GetAnyDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_GetAnyDCName_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_GetAnyDCName_in_get_logon_server,
		.set = py_netr_GetAnyDCName_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domainname"),
		.get = py_netr_GetAnyDCName_in_get_domainname,
		.set = py_netr_GetAnyDCName_in_set_domainname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_dcname"),
		.get = py_netr_GetAnyDCName_out_get_dcname,
		.set = py_netr_GetAnyDCName_out_set_dcname,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_GetAnyDCName_get_result,
		.set = py_netr_GetAnyDCName_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_GetAnyDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_GetAnyDCName, type);
	return self;
}

static PyObject *py_netr_GetAnyDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(13);
}

static PyObject *py_netr_GetAnyDCName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 14) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[13];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_GetAnyDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_GetAnyDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_GetAnyDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 14) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[13];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_GetAnyDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_GetAnyDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_GetAnyDCName_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetAnyDCName *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 14) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[13];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_GetAnyDCName_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_GetAnyDCName_ndr_print(py_obj, args, kwargs, "netr_GetAnyDCName_in", NDR_IN);
}

static PyObject *py_netr_GetAnyDCName_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_GetAnyDCName_ndr_print(py_obj, args, kwargs, "netr_GetAnyDCName_out", NDR_OUT);
}

static PyMethodDef py_netr_GetAnyDCName_methods[] = {
	{ "opnum", (PyCFunction)py_netr_GetAnyDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_GetAnyDCName.opnum() -> 13 (0x0d) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_GetAnyDCName_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_GetAnyDCName",
	.tp_getset = py_netr_GetAnyDCName_getsetters,
	.tp_methods = py_netr_GetAnyDCName_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_GetAnyDCName_new,
};

static bool pack_py_netr_GetAnyDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetAnyDCName *r)
{
	PyObject *py_logon_server;
	PyObject *py_domainname;
	const char *kwnames[] = {
		"logon_server", "domainname", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetAnyDCName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	if (py_logon_server == Py_None) {
		r->in.logon_server = NULL;
	} else {
		r->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_logon_server)) {
				unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_logon_server)) {
				test_str = PyBytes_AS_STRING(py_logon_server);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.logon_server = talloc_str;
		}
	}
	if (py_domainname == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domainname");
		return false;
	}
	if (py_domainname == Py_None) {
		r->in.domainname = NULL;
	} else {
		r->in.domainname = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_domainname)) {
				unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_domainname)) {
				test_str = PyBytes_AS_STRING(py_domainname);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.domainname = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_GetAnyDCName_args_out(struct netr_GetAnyDCName *r, bool raise_result_exception)
{
	PyObject *py_dcname = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.dcname == NULL) {
		py_dcname = Py_None;
		Py_INCREF(py_dcname);
	} else {
		if (*r->out.dcname == NULL) {
			py_dcname = Py_None;
			Py_INCREF(py_dcname);
		} else {
			py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
		}
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_dcname);
	}
	if (result_size == 1) {
		result = py_dcname;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonControl2_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		if (object->in.logon_server == NULL) {
			py_logon_server = Py_None;
			Py_INCREF(py_logon_server);
		} else {
			py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
		}
	}
	return py_logon_server;
}

static int py_netr_LogonControl2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	if (value == Py_None) {
		object->in.logon_server = NULL;
	} else {
		object->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.logon_server = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl2_in_get_function_code(PyObject *obj, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
	PyObject *py_function_code;
	py_function_code = PyLong_FromUnsignedLongLong((uint32_t)(object->in.function_code));
	return py_function_code;
}

static int py_netr_LogonControl2_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.function_code");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.function_code = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl2_in_get_level(PyObject *obj, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_netr_LogonControl2_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl2_in_get_data(PyObject *obj, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->in.data == NULL) {
		Py_RETURN_NONE;
	}
	py_data = pyrpc_import_union(&netr_CONTROL_DATA_INFORMATION_Type, object->in.data, object->in.function_code, object->in.data, "union netr_CONTROL_DATA_INFORMATION");
	if (py_data == NULL) {
		return NULL;
	}
	return py_data;
}

static int py_netr_LogonControl2_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.data");
		return -1;
	}
	object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
	if (object->in.data == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_CONTROL_DATA_INFORMATION *data_switch_1;
		data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.function_code, value, "union netr_CONTROL_DATA_INFORMATION");
		if (data_switch_1 == NULL) {
			return -1;
		}
		object->in.data = data_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonControl2_out_get_query(PyObject *obj, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
	PyObject *py_query;
	if (object->out.query == NULL) {
		Py_RETURN_NONE;
	}
	py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, object->out.query, object->in.level, object->out.query, "union netr_CONTROL_QUERY_INFORMATION");
	if (py_query == NULL) {
		return NULL;
	}
	return py_query;
}

static int py_netr_LogonControl2_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.query");
		return -1;
	}
	object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
	if (object->out.query == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
		query_switch_1 = (union netr_CONTROL_QUERY_INFORMATION *)pyrpc_export_union(&netr_CONTROL_QUERY_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_CONTROL_QUERY_INFORMATION");
		if (query_switch_1 == NULL) {
			return -1;
		}
		object->out.query = query_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonControl2_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_LogonControl2_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonControl2_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_LogonControl2_in_get_logon_server,
		.set = py_netr_LogonControl2_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_function_code"),
		.get = py_netr_LogonControl2_in_get_function_code,
		.set = py_netr_LogonControl2_in_set_function_code,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_netr_LogonControl2_in_get_level,
		.set = py_netr_LogonControl2_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_data"),
		.get = py_netr_LogonControl2_in_get_data,
		.set = py_netr_LogonControl2_in_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
	},
	{
		.name = discard_const_p(char, "out_query"),
		.get = py_netr_LogonControl2_out_get_query,
		.set = py_netr_LogonControl2_out_set_query,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonControl2_get_result,
		.set = py_netr_LogonControl2_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonControl2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonControl2, type);
	struct netr_LogonControl2 *_self = (struct netr_LogonControl2 *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
	_self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
	return self;
}

static PyObject *py_netr_LogonControl2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(14);
}

static PyObject *py_netr_LogonControl2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 15) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[14];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonControl2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonControl2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonControl2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonControl2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonControl2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 15) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[14];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonControl2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonControl2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonControl2_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl2 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 15) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[14];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonControl2_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonControl2_ndr_print(py_obj, args, kwargs, "netr_LogonControl2_in", NDR_IN);
}

static PyObject *py_netr_LogonControl2_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonControl2_ndr_print(py_obj, args, kwargs, "netr_LogonControl2_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonControl2_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonControl2_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonControl2.opnum() -> 14 (0x0e) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonControl2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonControl2",
	.tp_getset = py_netr_LogonControl2_getsetters,
	.tp_methods = py_netr_LogonControl2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonControl2_new,
};

static bool pack_py_netr_LogonControl2_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2 *r)
{
	PyObject *py_logon_server;
	PyObject *py_function_code;
	PyObject *py_level;
	PyObject *py_data;
	const char *kwnames[] = {
		"logon_server", "function_code", "level", "data", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	if (py_logon_server == Py_None) {
		r->in.logon_server = NULL;
	} else {
		r->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_logon_server)) {
				unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_logon_server)) {
				test_str = PyBytes_AS_STRING(py_logon_server);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.logon_server = talloc_str;
		}
	}
	if (py_function_code == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.function_code");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
		if (PyLong_Check(py_function_code)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_function_code);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.function_code = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_data == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.data");
		return false;
	}
	r->in.data = talloc_ptrtype(r, r->in.data);
	if (r->in.data == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		union netr_CONTROL_DATA_INFORMATION *data_switch_1;
		data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, r, r->in.function_code, py_data, "union netr_CONTROL_DATA_INFORMATION");
		if (data_switch_1 == NULL) {
			return false;
		}
		r->in.data = data_switch_1;
	}
	return true;
}

static PyObject *unpack_py_netr_LogonControl2_args_out(struct netr_LogonControl2 *r, bool raise_result_exception)
{
	PyObject *py_query = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, r->out.query, r->in.level, r->out.query, "union netr_CONTROL_QUERY_INFORMATION");
	if (py_query == NULL) {
		return NULL;
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_query);
	}
	if (result_size == 1) {
		result = py_query;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerAuthenticate2_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerAuthenticate2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerAuthenticate2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerAuthenticate2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerAuthenticate2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_in_get_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_credentials;
	if (object->in.credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
	return py_credentials;
}

static int py_netr_ServerAuthenticate2_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
		return -1;
	}
	object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
	if (object->in.credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_out_get_return_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_return_credentials;
	if (object->out.return_credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
	return py_return_credentials;
}

static int py_netr_ServerAuthenticate2_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
		return -1;
	}
	object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
	if (object->out.return_credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_in_get_negotiate_flags(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_negotiate_flags;
	if (object->in.negotiate_flags == NULL) {
		Py_RETURN_NONE;
	}
	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.negotiate_flags));
	return py_negotiate_flags;
}

static int py_netr_ServerAuthenticate2_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.negotiate_flags");
		return -1;
	}
	object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
	if (object->in.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_out_get_negotiate_flags(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_negotiate_flags;
	if (object->out.negotiate_flags == NULL) {
		Py_RETURN_NONE;
	}
	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.negotiate_flags));
	return py_negotiate_flags;
}

static int py_netr_ServerAuthenticate2_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.negotiate_flags");
		return -1;
	}
	object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
	if (object->out.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate2_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerAuthenticate2_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerAuthenticate2_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerAuthenticate2_in_get_server_name,
		.set = py_netr_ServerAuthenticate2_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerAuthenticate2_in_get_account_name,
		.set = py_netr_ServerAuthenticate2_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerAuthenticate2_in_get_secure_channel_type,
		.set = py_netr_ServerAuthenticate2_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerAuthenticate2_in_get_computer_name,
		.set = py_netr_ServerAuthenticate2_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credentials"),
		.get = py_netr_ServerAuthenticate2_in_get_credentials,
		.set = py_netr_ServerAuthenticate2_in_set_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "out_return_credentials"),
		.get = py_netr_ServerAuthenticate2_out_get_return_credentials,
		.set = py_netr_ServerAuthenticate2_out_set_return_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "in_negotiate_flags"),
		.get = py_netr_ServerAuthenticate2_in_get_negotiate_flags,
		.set = py_netr_ServerAuthenticate2_in_set_negotiate_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
	},
	{
		.name = discard_const_p(char, "out_negotiate_flags"),
		.get = py_netr_ServerAuthenticate2_out_get_negotiate_flags,
		.set = py_netr_ServerAuthenticate2_out_set_negotiate_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerAuthenticate2_get_result,
		.set = py_netr_ServerAuthenticate2_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerAuthenticate2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerAuthenticate2, type);
	struct netr_ServerAuthenticate2 *_self = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
	_self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
	_self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
	_self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
	return self;
}

static PyObject *py_netr_ServerAuthenticate2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(15);
}

static PyObject *py_netr_ServerAuthenticate2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 16) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[15];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerAuthenticate2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticate2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticate2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 16) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[15];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticate2_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate2 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 16) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[15];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerAuthenticate2_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticate2_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticate2_in", NDR_IN);
}

static PyObject *py_netr_ServerAuthenticate2_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticate2_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticate2_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerAuthenticate2_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerAuthenticate2_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerAuthenticate2.opnum() -> 15 (0x0f) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerAuthenticate2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerAuthenticate2",
	.tp_getset = py_netr_ServerAuthenticate2_getsetters,
	.tp_methods = py_netr_ServerAuthenticate2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerAuthenticate2_new,
};

static bool pack_py_netr_ServerAuthenticate2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate2 *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credentials;
	PyObject *py_negotiate_flags;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerAuthenticate2", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credentials, &py_negotiate_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credentials == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
		return false;
	}
	r->in.credentials = talloc_ptrtype(r, r->in.credentials);
	if (r->in.credentials == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
	if (py_negotiate_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.negotiate_flags");
		return false;
	}
	r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
	if (r->in.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
		if (PyLong_Check(py_negotiate_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_ServerAuthenticate2_args_out(struct netr_ServerAuthenticate2 *r, bool raise_result_exception)
{
	PyObject *py_return_credentials = NULL;
	PyObject *py_negotiate_flags = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
	PyTuple_SetItem(result, 0, py_return_credentials);

	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.negotiate_flags));
	PyTuple_SetItem(result, 1, py_negotiate_flags);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DatabaseSync2_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
	}
	return py_logon_server;
}

static int py_netr_DatabaseSync2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
	if (object->in.logon_server == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.logon_server = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_in_get_computername(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_computername;
	if (object->in.computername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computername == NULL) {
		py_computername = Py_None;
		Py_INCREF(py_computername);
	} else {
		py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
	}
	return py_computername;
}

static int py_netr_DatabaseSync2_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
		return -1;
	}
	object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
	if (object->in.computername == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computername = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_DatabaseSync2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseSync2_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseSync2_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseSync2_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseSync2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseSync2_in_get_database_id(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_database_id;
	py_database_id = PyLong_FromUnsignedLongLong((uint32_t)(object->in.database_id));
	return py_database_id;
}

static int py_netr_DatabaseSync2_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.database_id");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.database_id = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_in_get_restart_state(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_restart_state;
	py_restart_state = PyLong_FromLong((uint16_t)(object->in.restart_state));
	return py_restart_state;
}

static int py_netr_DatabaseSync2_in_set_restart_state(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.restart_state");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.restart_state));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.restart_state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_in_get_sync_context(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_sync_context;
	if (object->in.sync_context == NULL) {
		Py_RETURN_NONE;
	}
	py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.sync_context));
	return py_sync_context;
}

static int py_netr_DatabaseSync2_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.sync_context");
		return -1;
	}
	object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
	if (object->in.sync_context == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.sync_context = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_out_get_sync_context(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_sync_context;
	if (object->out.sync_context == NULL) {
		Py_RETURN_NONE;
	}
	py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.sync_context));
	return py_sync_context;
}

static int py_netr_DatabaseSync2_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.sync_context");
		return -1;
	}
	object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
	if (object->out.sync_context == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.sync_context = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_out_get_delta_enum_array(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_enum_array;
	if (object->out.delta_enum_array == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
	}
	return py_delta_enum_array;
}

static int py_netr_DatabaseSync2_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
		return -1;
	}
	object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
	if (object->out.delta_enum_array == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.delta_enum_array = NULL;
	} else {
		*object->out.delta_enum_array = NULL;
		PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_in_get_preferredmaximumlength(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_preferredmaximumlength;
	py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)(object->in.preferredmaximumlength));
	return py_preferredmaximumlength;
}

static int py_netr_DatabaseSync2_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.preferredmaximumlength");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.preferredmaximumlength = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseSync2_get_result(PyObject *obj, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_DatabaseSync2_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DatabaseSync2_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_DatabaseSync2_in_get_logon_server,
		.set = py_netr_DatabaseSync2_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computername"),
		.get = py_netr_DatabaseSync2_in_get_computername,
		.set = py_netr_DatabaseSync2_in_set_computername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_DatabaseSync2_in_get_credential,
		.set = py_netr_DatabaseSync2_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_DatabaseSync2_in_get_return_authenticator,
		.set = py_netr_DatabaseSync2_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_DatabaseSync2_out_get_return_authenticator,
		.set = py_netr_DatabaseSync2_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_database_id"),
		.get = py_netr_DatabaseSync2_in_get_database_id,
		.set = py_netr_DatabaseSync2_in_set_database_id,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
	},
	{
		.name = discard_const_p(char, "in_restart_state"),
		.get = py_netr_DatabaseSync2_in_get_restart_state,
		.set = py_netr_DatabaseSync2_in_set_restart_state,
		.doc = discard_const_p(char, "PIDL-generated element of base type SyncStateEnum")
	},
	{
		.name = discard_const_p(char, "in_sync_context"),
		.get = py_netr_DatabaseSync2_in_get_sync_context,
		.set = py_netr_DatabaseSync2_in_set_sync_context,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_sync_context"),
		.get = py_netr_DatabaseSync2_out_get_sync_context,
		.set = py_netr_DatabaseSync2_out_set_sync_context,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_delta_enum_array"),
		.get = py_netr_DatabaseSync2_out_get_delta_enum_array,
		.set = py_netr_DatabaseSync2_out_set_delta_enum_array,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
	},
	{
		.name = discard_const_p(char, "in_preferredmaximumlength"),
		.get = py_netr_DatabaseSync2_in_get_preferredmaximumlength,
		.set = py_netr_DatabaseSync2_in_set_preferredmaximumlength,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DatabaseSync2_get_result,
		.set = py_netr_DatabaseSync2_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DatabaseSync2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DatabaseSync2, type);
	struct netr_DatabaseSync2 *_self = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
	_self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
	/* a pointer to a NULL pointer */
	_self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
	return self;
}

static PyObject *py_netr_DatabaseSync2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(16);
}

static PyObject *py_netr_DatabaseSync2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 17) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[16];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DatabaseSync2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DatabaseSync2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DatabaseSync2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 17) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[16];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DatabaseSync2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseSync2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseSync2_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseSync2 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 17) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[16];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DatabaseSync2_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseSync2_ndr_print(py_obj, args, kwargs, "netr_DatabaseSync2_in", NDR_IN);
}

static PyObject *py_netr_DatabaseSync2_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseSync2_ndr_print(py_obj, args, kwargs, "netr_DatabaseSync2_out", NDR_OUT);
}

static PyMethodDef py_netr_DatabaseSync2_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DatabaseSync2_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DatabaseSync2.opnum() -> 16 (0x10) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DatabaseSync2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DatabaseSync2",
	.tp_getset = py_netr_DatabaseSync2_getsetters,
	.tp_methods = py_netr_DatabaseSync2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DatabaseSync2_new,
};

static bool pack_py_netr_DatabaseSync2_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync2 *r)
{
	PyObject *py_logon_server;
	PyObject *py_computername;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_database_id;
	PyObject *py_restart_state;
	PyObject *py_sync_context;
	PyObject *py_preferredmaximumlength;
	const char *kwnames[] = {
		"logon_server", "computername", "credential", "return_authenticator", "database_id", "restart_state", "sync_context", "preferredmaximumlength", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_DatabaseSync2", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_database_id, &py_restart_state, &py_sync_context, &py_preferredmaximumlength)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
	if (r->in.logon_server == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_logon_server)) {
			unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_logon_server)) {
			test_str = PyBytes_AS_STRING(py_logon_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.logon_server = talloc_str;
	}
	if (py_computername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
		return false;
	}
	r->in.computername = talloc_ptrtype(r, r->in.computername);
	if (r->in.computername == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computername)) {
			unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computername)) {
			test_str = PyBytes_AS_STRING(py_computername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computername = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_database_id == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.database_id");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
		if (PyLong_Check(py_database_id)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_database_id);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.database_id = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_restart_state == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.restart_state");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.restart_state));
		if (PyLong_Check(py_restart_state)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_restart_state);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.restart_state = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_sync_context == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.sync_context");
		return false;
	}
	r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
	if (r->in.sync_context == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
		if (PyLong_Check(py_sync_context)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_sync_context);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.sync_context = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_preferredmaximumlength == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.preferredmaximumlength");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
		if (PyLong_Check(py_preferredmaximumlength)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.preferredmaximumlength = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DatabaseSync2_args_out(struct netr_DatabaseSync2 *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_sync_context = NULL;
	PyObject *py_delta_enum_array = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.sync_context));
	PyTuple_SetItem(result, 1, py_sync_context);

	if (*r->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
	}
	PyTuple_SetItem(result, 2, py_delta_enum_array);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DatabaseRedo_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
	}
	return py_logon_server;
}

static int py_netr_DatabaseRedo_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
	if (object->in.logon_server == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.logon_server = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseRedo_in_get_computername(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_computername;
	if (object->in.computername == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computername == NULL) {
		py_computername = Py_None;
		Py_INCREF(py_computername);
	} else {
		py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
	}
	return py_computername;
}

static int py_netr_DatabaseRedo_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computername");
		return -1;
	}
	object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
	if (object->in.computername == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computername = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DatabaseRedo_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_DatabaseRedo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseRedo_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseRedo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseRedo_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DatabaseRedo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_change_log_entry;
	py_change_log_entry = pytalloc_reference_ex(&netr_ChangeLogEntry_Type, pytalloc_get_mem_ctx(obj), &object->in.change_log_entry);
	return py_change_log_entry;
}

static int py_netr_DatabaseRedo_in_set_change_log_entry(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.change_log_entry");
		return -1;
	}
	PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry_size(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_change_log_entry_size;
	py_change_log_entry_size = PyLong_FromUnsignedLongLong((uint32_t)(object->in.change_log_entry_size));
	return py_change_log_entry_size;
}

static int py_netr_DatabaseRedo_in_set_change_log_entry_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.change_log_entry_size");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.change_log_entry_size));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.change_log_entry_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DatabaseRedo_out_get_delta_enum_array(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_delta_enum_array;
	if (object->out.delta_enum_array == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
	}
	return py_delta_enum_array;
}

static int py_netr_DatabaseRedo_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.delta_enum_array");
		return -1;
	}
	object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
	if (object->out.delta_enum_array == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.delta_enum_array = NULL;
	} else {
		*object->out.delta_enum_array = NULL;
		PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DatabaseRedo_get_result(PyObject *obj, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_DatabaseRedo_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DatabaseRedo_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_DatabaseRedo_in_get_logon_server,
		.set = py_netr_DatabaseRedo_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computername"),
		.get = py_netr_DatabaseRedo_in_get_computername,
		.set = py_netr_DatabaseRedo_in_set_computername,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_DatabaseRedo_in_get_credential,
		.set = py_netr_DatabaseRedo_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_DatabaseRedo_in_get_return_authenticator,
		.set = py_netr_DatabaseRedo_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_DatabaseRedo_out_get_return_authenticator,
		.set = py_netr_DatabaseRedo_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_change_log_entry"),
		.get = py_netr_DatabaseRedo_in_get_change_log_entry,
		.set = py_netr_DatabaseRedo_in_set_change_log_entry,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogEntry")
	},
	{
		.name = discard_const_p(char, "in_change_log_entry_size"),
		.get = py_netr_DatabaseRedo_in_get_change_log_entry_size,
		.set = py_netr_DatabaseRedo_in_set_change_log_entry_size,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_delta_enum_array"),
		.get = py_netr_DatabaseRedo_out_get_delta_enum_array,
		.set = py_netr_DatabaseRedo_out_set_delta_enum_array,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DatabaseRedo_get_result,
		.set = py_netr_DatabaseRedo_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DatabaseRedo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DatabaseRedo, type);
	struct netr_DatabaseRedo *_self = (struct netr_DatabaseRedo *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	/* a pointer to a NULL pointer */
	_self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
	return self;
}

static PyObject *py_netr_DatabaseRedo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(17);
}

static PyObject *py_netr_DatabaseRedo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 18) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[17];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DatabaseRedo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DatabaseRedo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DatabaseRedo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 18) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[17];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DatabaseRedo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseRedo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DatabaseRedo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DatabaseRedo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 18) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[17];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DatabaseRedo_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseRedo_ndr_print(py_obj, args, kwargs, "netr_DatabaseRedo_in", NDR_IN);
}

static PyObject *py_netr_DatabaseRedo_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DatabaseRedo_ndr_print(py_obj, args, kwargs, "netr_DatabaseRedo_out", NDR_OUT);
}

static PyMethodDef py_netr_DatabaseRedo_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DatabaseRedo_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DatabaseRedo.opnum() -> 17 (0x11) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DatabaseRedo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DatabaseRedo",
	.tp_getset = py_netr_DatabaseRedo_getsetters,
	.tp_methods = py_netr_DatabaseRedo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DatabaseRedo_new,
};

static bool pack_py_netr_DatabaseRedo_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseRedo *r)
{
	PyObject *py_logon_server;
	PyObject *py_computername;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_change_log_entry;
	PyObject *py_change_log_entry_size;
	const char *kwnames[] = {
		"logon_server", "computername", "credential", "return_authenticator", "change_log_entry", "change_log_entry_size", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_DatabaseRedo", discard_const_p(char *, kwnames), &py_logon_server, &py_computername, &py_credential, &py_return_authenticator, &py_change_log_entry, &py_change_log_entry_size)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
	if (r->in.logon_server == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_logon_server)) {
			unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_logon_server)) {
			test_str = PyBytes_AS_STRING(py_logon_server);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.logon_server = talloc_str;
	}
	if (py_computername == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computername");
		return false;
	}
	r->in.computername = talloc_ptrtype(r, r->in.computername);
	if (r->in.computername == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computername)) {
			unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computername)) {
			test_str = PyBytes_AS_STRING(py_computername);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computername = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_change_log_entry == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.change_log_entry");
		return false;
	}
	PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, py_change_log_entry, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_change_log_entry)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_change_log_entry);
	if (py_change_log_entry_size == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.change_log_entry_size");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.change_log_entry_size));
		if (PyLong_Check(py_change_log_entry_size)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_change_log_entry_size);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.change_log_entry_size = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DatabaseRedo_args_out(struct netr_DatabaseRedo *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_delta_enum_array = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	if (*r->out.delta_enum_array == NULL) {
		py_delta_enum_array = Py_None;
		Py_INCREF(py_delta_enum_array);
	} else {
		py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
	}
	PyTuple_SetItem(result, 1, py_delta_enum_array);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonControl2Ex_in_get_logon_server(PyObject *obj, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_server;
	if (object->in.logon_server == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.logon_server == NULL) {
		py_logon_server = Py_None;
		Py_INCREF(py_logon_server);
	} else {
		if (object->in.logon_server == NULL) {
			py_logon_server = Py_None;
			Py_INCREF(py_logon_server);
		} else {
			py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
		}
	}
	return py_logon_server;
}

static int py_netr_LogonControl2Ex_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_server");
		return -1;
	}
	if (value == Py_None) {
		object->in.logon_server = NULL;
	} else {
		object->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.logon_server = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl2Ex_in_get_function_code(PyObject *obj, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
	PyObject *py_function_code;
	py_function_code = PyLong_FromUnsignedLongLong((uint32_t)(object->in.function_code));
	return py_function_code;
}

static int py_netr_LogonControl2Ex_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.function_code");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.function_code = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl2Ex_in_get_level(PyObject *obj, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_netr_LogonControl2Ex_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonControl2Ex_in_get_data(PyObject *obj, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
	PyObject *py_data;
	if (object->in.data == NULL) {
		Py_RETURN_NONE;
	}
	py_data = pyrpc_import_union(&netr_CONTROL_DATA_INFORMATION_Type, object->in.data, object->in.function_code, object->in.data, "union netr_CONTROL_DATA_INFORMATION");
	if (py_data == NULL) {
		return NULL;
	}
	return py_data;
}

static int py_netr_LogonControl2Ex_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.data");
		return -1;
	}
	object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
	if (object->in.data == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_CONTROL_DATA_INFORMATION *data_switch_1;
		data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.function_code, value, "union netr_CONTROL_DATA_INFORMATION");
		if (data_switch_1 == NULL) {
			return -1;
		}
		object->in.data = data_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonControl2Ex_out_get_query(PyObject *obj, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
	PyObject *py_query;
	if (object->out.query == NULL) {
		Py_RETURN_NONE;
	}
	py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, object->out.query, object->in.level, object->out.query, "union netr_CONTROL_QUERY_INFORMATION");
	if (py_query == NULL) {
		return NULL;
	}
	return py_query;
}

static int py_netr_LogonControl2Ex_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.query");
		return -1;
	}
	object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
	if (object->out.query == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
		query_switch_1 = (union netr_CONTROL_QUERY_INFORMATION *)pyrpc_export_union(&netr_CONTROL_QUERY_INFORMATION_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_CONTROL_QUERY_INFORMATION");
		if (query_switch_1 == NULL) {
			return -1;
		}
		object->out.query = query_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonControl2Ex_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_LogonControl2Ex_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonControl2Ex_getsetters[] = {
	{
		.name = discard_const_p(char, "in_logon_server"),
		.get = py_netr_LogonControl2Ex_in_get_logon_server,
		.set = py_netr_LogonControl2Ex_in_set_logon_server,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_function_code"),
		.get = py_netr_LogonControl2Ex_in_get_function_code,
		.set = py_netr_LogonControl2Ex_in_set_function_code,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_netr_LogonControl2Ex_in_get_level,
		.set = py_netr_LogonControl2Ex_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_data"),
		.get = py_netr_LogonControl2Ex_in_get_data,
		.set = py_netr_LogonControl2Ex_in_set_data,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
	},
	{
		.name = discard_const_p(char, "out_query"),
		.get = py_netr_LogonControl2Ex_out_get_query,
		.set = py_netr_LogonControl2Ex_out_set_query,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonControl2Ex_get_result,
		.set = py_netr_LogonControl2Ex_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonControl2Ex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonControl2Ex, type);
	struct netr_LogonControl2Ex *_self = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
	_self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
	return self;
}

static PyObject *py_netr_LogonControl2Ex_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(18);
}

static PyObject *py_netr_LogonControl2Ex_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 19) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[18];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonControl2Ex_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonControl2Ex_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonControl2Ex_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 19) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[18];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonControl2Ex_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonControl2Ex_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonControl2Ex_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonControl2Ex *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 19) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[18];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonControl2Ex_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonControl2Ex_ndr_print(py_obj, args, kwargs, "netr_LogonControl2Ex_in", NDR_IN);
}

static PyObject *py_netr_LogonControl2Ex_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonControl2Ex_ndr_print(py_obj, args, kwargs, "netr_LogonControl2Ex_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonControl2Ex_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonControl2Ex_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonControl2Ex.opnum() -> 18 (0x12) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonControl2Ex_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonControl2Ex",
	.tp_getset = py_netr_LogonControl2Ex_getsetters,
	.tp_methods = py_netr_LogonControl2Ex_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonControl2Ex_new,
};

static bool pack_py_netr_LogonControl2Ex_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2Ex *r)
{
	PyObject *py_logon_server;
	PyObject *py_function_code;
	PyObject *py_level;
	PyObject *py_data;
	const char *kwnames[] = {
		"logon_server", "function_code", "level", "data", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2Ex", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
		return false;
	}

	if (py_logon_server == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_server");
		return false;
	}
	if (py_logon_server == Py_None) {
		r->in.logon_server = NULL;
	} else {
		r->in.logon_server = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_logon_server)) {
				unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_logon_server)) {
				test_str = PyBytes_AS_STRING(py_logon_server);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.logon_server = talloc_str;
		}
	}
	if (py_function_code == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.function_code");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
		if (PyLong_Check(py_function_code)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_function_code);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.function_code = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_data == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.data");
		return false;
	}
	r->in.data = talloc_ptrtype(r, r->in.data);
	if (r->in.data == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		union netr_CONTROL_DATA_INFORMATION *data_switch_1;
		data_switch_1 = (union netr_CONTROL_DATA_INFORMATION *)pyrpc_export_union(&netr_CONTROL_DATA_INFORMATION_Type, r, r->in.function_code, py_data, "union netr_CONTROL_DATA_INFORMATION");
		if (data_switch_1 == NULL) {
			return false;
		}
		r->in.data = data_switch_1;
	}
	return true;
}

static PyObject *unpack_py_netr_LogonControl2Ex_args_out(struct netr_LogonControl2Ex *r, bool raise_result_exception)
{
	PyObject *py_query = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_query = pyrpc_import_union(&netr_CONTROL_QUERY_INFORMATION_Type, r->out.query, r->in.level, r->out.query, "union netr_CONTROL_QUERY_INFORMATION");
	if (py_query == NULL) {
		return NULL;
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_query);
	}
	if (result_size == 1) {
		result = py_query;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_NetrEnumerateTrustedDomains_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_NetrEnumerateTrustedDomains_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob(PyObject *obj, void *closure)
{
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(obj);
	PyObject *py_trusted_domains_blob;
	if (object->out.trusted_domains_blob == NULL) {
		Py_RETURN_NONE;
	}
	py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, object->out.trusted_domains_blob, object->out.trusted_domains_blob);
	return py_trusted_domains_blob;
}

static int py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusted_domains_blob));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.trusted_domains_blob");
		return -1;
	}
	object->out.trusted_domains_blob = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusted_domains_blob);
	if (object->out.trusted_domains_blob == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Blob_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.trusted_domains_blob = (struct netr_Blob *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_get_result(PyObject *obj, void *closure)
{
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_NetrEnumerateTrustedDomains_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_NetrEnumerateTrustedDomains_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_NetrEnumerateTrustedDomains_in_get_server_name,
		.set = py_netr_NetrEnumerateTrustedDomains_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_trusted_domains_blob"),
		.get = py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob,
		.set = py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Blob")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_NetrEnumerateTrustedDomains_get_result,
		.set = py_netr_NetrEnumerateTrustedDomains_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_NetrEnumerateTrustedDomains_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomains, type);
	struct netr_NetrEnumerateTrustedDomains *_self = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.trusted_domains_blob = talloc_zero(mem_ctx, struct netr_Blob);
	return self;
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(19);
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 20) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[19];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 20) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[19];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrEnumerateTrustedDomains *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 20) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[19];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, args, kwargs, "netr_NetrEnumerateTrustedDomains_in", NDR_IN);
}

static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, args, kwargs, "netr_NetrEnumerateTrustedDomains_out", NDR_OUT);
}

static PyMethodDef py_netr_NetrEnumerateTrustedDomains_methods[] = {
	{ "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_NetrEnumerateTrustedDomains.opnum() -> 19 (0x13) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_NetrEnumerateTrustedDomains_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NetrEnumerateTrustedDomains",
	.tp_getset = py_netr_NetrEnumerateTrustedDomains_getsetters,
	.tp_methods = py_netr_NetrEnumerateTrustedDomains_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NetrEnumerateTrustedDomains_new,
};

static bool pack_py_netr_NetrEnumerateTrustedDomains_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomains *r)
{
	PyObject *py_server_name;
	const char *kwnames[] = {
		"server_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomains", discard_const_p(char *, kwnames), &py_server_name)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_NetrEnumerateTrustedDomains_args_out(struct netr_NetrEnumerateTrustedDomains *r, bool raise_result_exception)
{
	PyObject *py_trusted_domains_blob = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, r->out.trusted_domains_blob, r->out.trusted_domains_blob);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_trusted_domains_blob);
	}
	if (result_size == 1) {
		result = py_trusted_domains_blob;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsRGetDCName_in_get_server_unc(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_server_unc;
	if (object->in.server_unc == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_unc == NULL) {
		py_server_unc = Py_None;
		Py_INCREF(py_server_unc);
	} else {
		if (object->in.server_unc == NULL) {
			py_server_unc = Py_None;
			Py_INCREF(py_server_unc);
		} else {
			py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
		}
	}
	return py_server_unc;
}

static int py_netr_DsRGetDCName_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_unc = NULL;
	} else {
		object->in.server_unc = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_unc = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCName_in_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	if (object->in.domain_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_name == NULL) {
		py_domain_name = Py_None;
		Py_INCREF(py_domain_name);
	} else {
		if (object->in.domain_name == NULL) {
			py_domain_name = Py_None;
			Py_INCREF(py_domain_name);
		} else {
			py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
		}
	}
	return py_domain_name;
}

static int py_netr_DsRGetDCName_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_name = NULL;
	} else {
		object->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.domain_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCName_in_get_domain_guid(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_guid;
	if (object->in.domain_guid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_guid == NULL) {
		py_domain_guid = Py_None;
		Py_INCREF(py_domain_guid);
	} else {
		py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
	}
	return py_domain_guid;
}

static int py_netr_DsRGetDCName_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_guid = NULL;
	} else {
		object->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCName_in_get_site_guid(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_site_guid;
	if (object->in.site_guid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.site_guid == NULL) {
		py_site_guid = Py_None;
		Py_INCREF(py_site_guid);
	} else {
		py_site_guid = pytalloc_reference_ex(GUID_Type, object->in.site_guid, object->in.site_guid);
	}
	return py_site_guid;
}

static int py_netr_DsRGetDCName_in_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.site_guid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_guid");
		return -1;
	}
	if (value == Py_None) {
		object->in.site_guid = NULL;
	} else {
		object->in.site_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.site_guid = (struct GUID *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCName_in_get_flags(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_netr_DsRGetDCName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCName_out_get_info(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
	}
	return py_info;
}

static int py_netr_DsRGetDCName_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
	if (object->out.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.info = NULL;
	} else {
		*object->out.info = NULL;
		PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCName_get_result(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsRGetDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsRGetDCName_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_unc"),
		.get = py_netr_DsRGetDCName_in_get_server_unc,
		.set = py_netr_DsRGetDCName_in_set_server_unc,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain_name"),
		.get = py_netr_DsRGetDCName_in_get_domain_name,
		.set = py_netr_DsRGetDCName_in_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain_guid"),
		.get = py_netr_DsRGetDCName_in_get_domain_guid,
		.set = py_netr_DsRGetDCName_in_set_domain_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "in_site_guid"),
		.get = py_netr_DsRGetDCName_in_get_site_guid,
		.set = py_netr_DsRGetDCName_in_set_site_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_netr_DsRGetDCName_in_get_flags,
		.set = py_netr_DsRGetDCName_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_netr_DsRGetDCName_out_get_info,
		.set = py_netr_DsRGetDCName_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsRGetDCName_get_result,
		.set = py_netr_DsRGetDCName_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsRGetDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsRGetDCName, type);
	struct netr_DsRGetDCName *_self = (struct netr_DsRGetDCName *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	/* a pointer to a NULL pointer */
	_self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
	return self;
}

static PyObject *py_netr_DsRGetDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(20);
}

static PyObject *py_netr_DsRGetDCName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 21) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[20];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsRGetDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsRGetDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsRGetDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 21) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[20];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRGetDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetDCName_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCName *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 21) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[20];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsRGetDCName_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetDCName_ndr_print(py_obj, args, kwargs, "netr_DsRGetDCName_in", NDR_IN);
}

static PyObject *py_netr_DsRGetDCName_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetDCName_ndr_print(py_obj, args, kwargs, "netr_DsRGetDCName_out", NDR_OUT);
}

static PyMethodDef py_netr_DsRGetDCName_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsRGetDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsRGetDCName.opnum() -> 20 (0x14) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRGetDCName_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRGetDCName",
	.tp_getset = py_netr_DsRGetDCName_getsetters,
	.tp_methods = py_netr_DsRGetDCName_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRGetDCName_new,
};

static bool pack_py_netr_DsRGetDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCName *r)
{
	PyObject *py_server_unc;
	PyObject *py_domain_name;
	PyObject *py_domain_guid;
	PyObject *py_site_guid;
	PyObject *py_flags;
	const char *kwnames[] = {
		"server_unc", "domain_name", "domain_guid", "site_guid", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_DsRGetDCName", discard_const_p(char *, kwnames), &py_server_unc, &py_domain_name, &py_domain_guid, &py_site_guid, &py_flags)) {
		return false;
	}

	if (py_server_unc == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
		return false;
	}
	if (py_server_unc == Py_None) {
		r->in.server_unc = NULL;
	} else {
		r->in.server_unc = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_unc)) {
				unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_unc)) {
				test_str = PyBytes_AS_STRING(py_server_unc);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_unc = talloc_str;
		}
	}
	if (py_domain_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
		return false;
	}
	if (py_domain_name == Py_None) {
		r->in.domain_name = NULL;
	} else {
		r->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_domain_name)) {
				unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_domain_name)) {
				test_str = PyBytes_AS_STRING(py_domain_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.domain_name = talloc_str;
		}
	}
	if (py_domain_guid == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
		return false;
	}
	if (py_domain_guid == Py_None) {
		r->in.domain_guid = NULL;
	} else {
		r->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
	}
	if (py_site_guid == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_guid");
		return false;
	}
	if (py_site_guid == Py_None) {
		r->in.site_guid = NULL;
	} else {
		r->in.site_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, py_site_guid, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_site_guid)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.site_guid = (struct GUID *)pytalloc_get_ptr(py_site_guid);
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsRGetDCName_args_out(struct netr_DsRGetDCName *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_info);
	}
	if (result_size == 1) {
		result = py_info;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonGetCapabilities_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
	}
	return py_server_name;
}

static int py_netr_LogonGetCapabilities_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
	if (object->in.server_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.server_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_LogonGetCapabilities_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		if (object->in.computer_name == NULL) {
			py_computer_name = Py_None;
			Py_INCREF(py_computer_name);
		} else {
			py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
		}
	}
	return py_computer_name;
}

static int py_netr_LogonGetCapabilities_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.computer_name = NULL;
	} else {
		object->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.computer_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonGetCapabilities_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_LogonGetCapabilities_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_LogonGetCapabilities_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_LogonGetCapabilities_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_LogonGetCapabilities_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_LogonGetCapabilities_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_LogonGetCapabilities_in_get_query_level(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_query_level;
	py_query_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.query_level));
	return py_query_level;
}

static int py_netr_LogonGetCapabilities_in_set_query_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.query_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.query_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.query_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonGetCapabilities_out_get_capabilities(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_capabilities;
	if (object->out.capabilities == NULL) {
		Py_RETURN_NONE;
	}
	py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, object->out.capabilities, object->in.query_level, object->out.capabilities, "union netr_Capabilities");
	if (py_capabilities == NULL) {
		return NULL;
	}
	return py_capabilities;
}

static int py_netr_LogonGetCapabilities_out_set_capabilities(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.capabilities));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.capabilities");
		return -1;
	}
	object->out.capabilities = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.capabilities);
	if (object->out.capabilities == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_Capabilities *capabilities_switch_1;
		capabilities_switch_1 = (union netr_Capabilities *)pyrpc_export_union(&netr_Capabilities_Type, pytalloc_get_mem_ctx(py_obj), object->in.query_level, value, "union netr_Capabilities");
		if (capabilities_switch_1 == NULL) {
			return -1;
		}
		object->out.capabilities = capabilities_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonGetCapabilities_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_LogonGetCapabilities_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonGetCapabilities_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonGetCapabilities_in_get_server_name,
		.set = py_netr_LogonGetCapabilities_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_LogonGetCapabilities_in_get_computer_name,
		.set = py_netr_LogonGetCapabilities_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_LogonGetCapabilities_in_get_credential,
		.set = py_netr_LogonGetCapabilities_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_LogonGetCapabilities_in_get_return_authenticator,
		.set = py_netr_LogonGetCapabilities_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_LogonGetCapabilities_out_get_return_authenticator,
		.set = py_netr_LogonGetCapabilities_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_query_level"),
		.get = py_netr_LogonGetCapabilities_in_get_query_level,
		.set = py_netr_LogonGetCapabilities_in_set_query_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_capabilities"),
		.get = py_netr_LogonGetCapabilities_out_get_capabilities,
		.set = py_netr_LogonGetCapabilities_out_set_capabilities,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Capabilities")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonGetCapabilities_get_result,
		.set = py_netr_LogonGetCapabilities_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonGetCapabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonGetCapabilities, type);
	struct netr_LogonGetCapabilities *_self = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.capabilities = talloc_zero(mem_ctx, union netr_Capabilities);
	return self;
}

static PyObject *py_netr_LogonGetCapabilities_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(21);
}

static PyObject *py_netr_LogonGetCapabilities_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 22) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[21];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonGetCapabilities_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonGetCapabilities_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonGetCapabilities_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 22) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[21];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonGetCapabilities_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetCapabilities *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 22) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[21];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonGetCapabilities_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonGetCapabilities_ndr_print(py_obj, args, kwargs, "netr_LogonGetCapabilities_in", NDR_IN);
}

static PyObject *py_netr_LogonGetCapabilities_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonGetCapabilities_ndr_print(py_obj, args, kwargs, "netr_LogonGetCapabilities_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonGetCapabilities_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonGetCapabilities_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonGetCapabilities.opnum() -> 21 (0x15) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonGetCapabilities_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonGetCapabilities",
	.tp_getset = py_netr_LogonGetCapabilities_getsetters,
	.tp_methods = py_netr_LogonGetCapabilities_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonGetCapabilities_new,
};

static bool pack_py_netr_LogonGetCapabilities_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetCapabilities *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_query_level;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "return_authenticator", "query_level", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_LogonGetCapabilities", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_query_level)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	r->in.server_name = talloc_ptrtype(r, r->in.server_name);
	if (r->in.server_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_server_name)) {
			unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_server_name)) {
			test_str = PyBytes_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;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.server_name = talloc_str;
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	if (py_computer_name == Py_None) {
		r->in.computer_name = NULL;
	} else {
		r->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_computer_name)) {
				unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_computer_name)) {
				test_str = PyBytes_AS_STRING(py_computer_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.computer_name = talloc_str;
		}
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_query_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.query_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.query_level));
		if (PyLong_Check(py_query_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_query_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.query_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_LogonGetCapabilities_args_out(struct netr_LogonGetCapabilities *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_capabilities = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, r->out.capabilities, r->in.query_level, r->out.capabilities, "union netr_Capabilities");
	if (py_capabilities == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_capabilities);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonGetTrustRid_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_LogonGetTrustRid_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonGetTrustRid_in_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	if (object->in.domain_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_name == NULL) {
		py_domain_name = Py_None;
		Py_INCREF(py_domain_name);
	} else {
		if (object->in.domain_name == NULL) {
			py_domain_name = Py_None;
			Py_INCREF(py_domain_name);
		} else {
			py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
		}
	}
	return py_domain_name;
}

static int py_netr_LogonGetTrustRid_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_name = NULL;
	} else {
		object->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.domain_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonGetTrustRid_out_get_rid(PyObject *obj, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
	PyObject *py_rid;
	if (object->out.rid == NULL) {
		Py_RETURN_NONE;
	}
	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.rid));
	return py_rid;
}

static int py_netr_LogonGetTrustRid_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.rid");
		return -1;
	}
	object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
	if (object->out.rid == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonGetTrustRid_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_LogonGetTrustRid_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonGetTrustRid_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonGetTrustRid_in_get_server_name,
		.set = py_netr_LogonGetTrustRid_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain_name"),
		.get = py_netr_LogonGetTrustRid_in_get_domain_name,
		.set = py_netr_LogonGetTrustRid_in_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_rid"),
		.get = py_netr_LogonGetTrustRid_out_get_rid,
		.set = py_netr_LogonGetTrustRid_out_set_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonGetTrustRid_get_result,
		.set = py_netr_LogonGetTrustRid_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonGetTrustRid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonGetTrustRid, type);
	struct netr_LogonGetTrustRid *_self = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.rid = talloc_zero(mem_ctx, uint32_t);
	return self;
}

static PyObject *py_netr_LogonGetTrustRid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(23);
}

static PyObject *py_netr_LogonGetTrustRid_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 24) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[23];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonGetTrustRid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonGetTrustRid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonGetTrustRid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 24) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[23];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonGetTrustRid_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetTrustRid *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 24) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[23];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonGetTrustRid_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonGetTrustRid_ndr_print(py_obj, args, kwargs, "netr_LogonGetTrustRid_in", NDR_IN);
}

static PyObject *py_netr_LogonGetTrustRid_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonGetTrustRid_ndr_print(py_obj, args, kwargs, "netr_LogonGetTrustRid_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonGetTrustRid_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonGetTrustRid_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonGetTrustRid.opnum() -> 23 (0x17) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonGetTrustRid_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonGetTrustRid",
	.tp_getset = py_netr_LogonGetTrustRid_getsetters,
	.tp_methods = py_netr_LogonGetTrustRid_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonGetTrustRid_new,
};

static bool pack_py_netr_LogonGetTrustRid_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetTrustRid *r)
{
	PyObject *py_server_name;
	PyObject *py_domain_name;
	const char *kwnames[] = {
		"server_name", "domain_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_LogonGetTrustRid", discard_const_p(char *, kwnames), &py_server_name, &py_domain_name)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_domain_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
		return false;
	}
	if (py_domain_name == Py_None) {
		r->in.domain_name = NULL;
	} else {
		r->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_domain_name)) {
				unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_domain_name)) {
				test_str = PyBytes_AS_STRING(py_domain_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.domain_name = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_LogonGetTrustRid_args_out(struct netr_LogonGetTrustRid *r, bool raise_result_exception)
{
	PyObject *py_rid = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.rid));
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_rid);
	}
	if (result_size == 1) {
		result = py_rid;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerAuthenticate3_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerAuthenticate3_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerAuthenticate3_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerAuthenticate3_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerAuthenticate3_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_in_get_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_credentials;
	if (object->in.credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
	return py_credentials;
}

static int py_netr_ServerAuthenticate3_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credentials");
		return -1;
	}
	object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
	if (object->in.credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_out_get_return_credentials(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_return_credentials;
	if (object->out.return_credentials == NULL) {
		Py_RETURN_NONE;
	}
	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
	return py_return_credentials;
}

static int py_netr_ServerAuthenticate3_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_credentials");
		return -1;
	}
	object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
	if (object->out.return_credentials == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_in_get_negotiate_flags(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_negotiate_flags;
	if (object->in.negotiate_flags == NULL) {
		Py_RETURN_NONE;
	}
	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.negotiate_flags));
	return py_negotiate_flags;
}

static int py_netr_ServerAuthenticate3_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.negotiate_flags");
		return -1;
	}
	object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
	if (object->in.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_out_get_negotiate_flags(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_negotiate_flags;
	if (object->out.negotiate_flags == NULL) {
		Py_RETURN_NONE;
	}
	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.negotiate_flags));
	return py_negotiate_flags;
}

static int py_netr_ServerAuthenticate3_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.negotiate_flags");
		return -1;
	}
	object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
	if (object->out.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_out_get_rid(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_rid;
	if (object->out.rid == NULL) {
		Py_RETURN_NONE;
	}
	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.rid));
	return py_rid;
}

static int py_netr_ServerAuthenticate3_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.rid");
		return -1;
	}
	object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
	if (object->out.rid == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticate3_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerAuthenticate3_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerAuthenticate3_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerAuthenticate3_in_get_server_name,
		.set = py_netr_ServerAuthenticate3_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerAuthenticate3_in_get_account_name,
		.set = py_netr_ServerAuthenticate3_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerAuthenticate3_in_get_secure_channel_type,
		.set = py_netr_ServerAuthenticate3_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerAuthenticate3_in_get_computer_name,
		.set = py_netr_ServerAuthenticate3_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credentials"),
		.get = py_netr_ServerAuthenticate3_in_get_credentials,
		.set = py_netr_ServerAuthenticate3_in_set_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "out_return_credentials"),
		.get = py_netr_ServerAuthenticate3_out_get_return_credentials,
		.set = py_netr_ServerAuthenticate3_out_set_return_credentials,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
	},
	{
		.name = discard_const_p(char, "in_negotiate_flags"),
		.get = py_netr_ServerAuthenticate3_in_get_negotiate_flags,
		.set = py_netr_ServerAuthenticate3_in_set_negotiate_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
	},
	{
		.name = discard_const_p(char, "out_negotiate_flags"),
		.get = py_netr_ServerAuthenticate3_out_get_negotiate_flags,
		.set = py_netr_ServerAuthenticate3_out_set_negotiate_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
	},
	{
		.name = discard_const_p(char, "out_rid"),
		.get = py_netr_ServerAuthenticate3_out_get_rid,
		.set = py_netr_ServerAuthenticate3_out_set_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerAuthenticate3_get_result,
		.set = py_netr_ServerAuthenticate3_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerAuthenticate3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerAuthenticate3, type);
	struct netr_ServerAuthenticate3 *_self = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
	_self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
	_self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
	_self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
	_self->out.rid = talloc_zero(mem_ctx, uint32_t);
	return self;
}

static PyObject *py_netr_ServerAuthenticate3_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(26);
}

static PyObject *py_netr_ServerAuthenticate3_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 27) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[26];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerAuthenticate3_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticate3_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticate3_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 27) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[26];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticate3_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticate3 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 27) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[26];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerAuthenticate3_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticate3_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticate3_in", NDR_IN);
}

static PyObject *py_netr_ServerAuthenticate3_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticate3_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticate3_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerAuthenticate3_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerAuthenticate3_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerAuthenticate3.opnum() -> 26 (0x1a) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerAuthenticate3_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerAuthenticate3",
	.tp_getset = py_netr_ServerAuthenticate3_getsetters,
	.tp_methods = py_netr_ServerAuthenticate3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerAuthenticate3_new,
};

static bool pack_py_netr_ServerAuthenticate3_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate3 *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credentials;
	PyObject *py_negotiate_flags;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerAuthenticate3", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credentials, &py_negotiate_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credentials == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credentials");
		return false;
	}
	r->in.credentials = talloc_ptrtype(r, r->in.credentials);
	if (r->in.credentials == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
	if (py_negotiate_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.negotiate_flags");
		return false;
	}
	r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
	if (r->in.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
		if (PyLong_Check(py_negotiate_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_ServerAuthenticate3_args_out(struct netr_ServerAuthenticate3 *r, bool raise_result_exception)
{
	PyObject *py_return_credentials = NULL;
	PyObject *py_negotiate_flags = NULL;
	PyObject *py_rid = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
	PyTuple_SetItem(result, 0, py_return_credentials);

	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.negotiate_flags));
	PyTuple_SetItem(result, 1, py_negotiate_flags);

	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.rid));
	PyTuple_SetItem(result, 2, py_rid);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsRGetDCNameEx_in_get_server_unc(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
	PyObject *py_server_unc;
	if (object->in.server_unc == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_unc == NULL) {
		py_server_unc = Py_None;
		Py_INCREF(py_server_unc);
	} else {
		if (object->in.server_unc == NULL) {
			py_server_unc = Py_None;
			Py_INCREF(py_server_unc);
		} else {
			py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
		}
	}
	return py_server_unc;
}

static int py_netr_DsRGetDCNameEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_unc = NULL;
	} else {
		object->in.server_unc = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_unc = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	if (object->in.domain_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_name == NULL) {
		py_domain_name = Py_None;
		Py_INCREF(py_domain_name);
	} else {
		if (object->in.domain_name == NULL) {
			py_domain_name = Py_None;
			Py_INCREF(py_domain_name);
		} else {
			py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
		}
	}
	return py_domain_name;
}

static int py_netr_DsRGetDCNameEx_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_name = NULL;
	} else {
		object->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.domain_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_guid(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_guid;
	if (object->in.domain_guid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_guid == NULL) {
		py_domain_guid = Py_None;
		Py_INCREF(py_domain_guid);
	} else {
		py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
	}
	return py_domain_guid;
}

static int py_netr_DsRGetDCNameEx_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_guid = NULL;
	} else {
		object->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx_in_get_site_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
	PyObject *py_site_name;
	if (object->in.site_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.site_name == NULL) {
		py_site_name = Py_None;
		Py_INCREF(py_site_name);
	} else {
		if (object->in.site_name == NULL) {
			py_site_name = Py_None;
			Py_INCREF(py_site_name);
		} else {
			py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
		}
	}
	return py_site_name;
}

static int py_netr_DsRGetDCNameEx_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.site_name = NULL;
	} else {
		object->in.site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.site_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx_in_get_flags(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_netr_DsRGetDCNameEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx_out_get_info(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
	}
	return py_info;
}

static int py_netr_DsRGetDCNameEx_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
	if (object->out.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.info = NULL;
	} else {
		*object->out.info = NULL;
		PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx_get_result(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsRGetDCNameEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsRGetDCNameEx_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_unc"),
		.get = py_netr_DsRGetDCNameEx_in_get_server_unc,
		.set = py_netr_DsRGetDCNameEx_in_set_server_unc,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain_name"),
		.get = py_netr_DsRGetDCNameEx_in_get_domain_name,
		.set = py_netr_DsRGetDCNameEx_in_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain_guid"),
		.get = py_netr_DsRGetDCNameEx_in_get_domain_guid,
		.set = py_netr_DsRGetDCNameEx_in_set_domain_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "in_site_name"),
		.get = py_netr_DsRGetDCNameEx_in_get_site_name,
		.set = py_netr_DsRGetDCNameEx_in_set_site_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_netr_DsRGetDCNameEx_in_get_flags,
		.set = py_netr_DsRGetDCNameEx_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_netr_DsRGetDCNameEx_out_get_info,
		.set = py_netr_DsRGetDCNameEx_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsRGetDCNameEx_get_result,
		.set = py_netr_DsRGetDCNameEx_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsRGetDCNameEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx, type);
	struct netr_DsRGetDCNameEx *_self = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	/* a pointer to a NULL pointer */
	_self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
	return self;
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(27);
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 28) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[27];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 28) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[27];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCNameEx *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 28) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[27];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetDCNameEx_ndr_print(py_obj, args, kwargs, "netr_DsRGetDCNameEx_in", NDR_IN);
}

static PyObject *py_netr_DsRGetDCNameEx_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetDCNameEx_ndr_print(py_obj, args, kwargs, "netr_DsRGetDCNameEx_out", NDR_OUT);
}

static PyMethodDef py_netr_DsRGetDCNameEx_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsRGetDCNameEx.opnum() -> 27 (0x1b) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRGetDCNameEx_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRGetDCNameEx",
	.tp_getset = py_netr_DsRGetDCNameEx_getsetters,
	.tp_methods = py_netr_DsRGetDCNameEx_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRGetDCNameEx_new,
};

static bool pack_py_netr_DsRGetDCNameEx_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx *r)
{
	PyObject *py_server_unc;
	PyObject *py_domain_name;
	PyObject *py_domain_guid;
	PyObject *py_site_name;
	PyObject *py_flags;
	const char *kwnames[] = {
		"server_unc", "domain_name", "domain_guid", "site_name", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_DsRGetDCNameEx", discard_const_p(char *, kwnames), &py_server_unc, &py_domain_name, &py_domain_guid, &py_site_name, &py_flags)) {
		return false;
	}

	if (py_server_unc == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
		return false;
	}
	if (py_server_unc == Py_None) {
		r->in.server_unc = NULL;
	} else {
		r->in.server_unc = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_unc)) {
				unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_unc)) {
				test_str = PyBytes_AS_STRING(py_server_unc);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_unc = talloc_str;
		}
	}
	if (py_domain_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
		return false;
	}
	if (py_domain_name == Py_None) {
		r->in.domain_name = NULL;
	} else {
		r->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_domain_name)) {
				unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_domain_name)) {
				test_str = PyBytes_AS_STRING(py_domain_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.domain_name = talloc_str;
		}
	}
	if (py_domain_guid == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
		return false;
	}
	if (py_domain_guid == Py_None) {
		r->in.domain_guid = NULL;
	} else {
		r->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
	}
	if (py_site_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_name");
		return false;
	}
	if (py_site_name == Py_None) {
		r->in.site_name = NULL;
	} else {
		r->in.site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_site_name)) {
				unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_site_name)) {
				test_str = PyBytes_AS_STRING(py_site_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.site_name = talloc_str;
		}
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsRGetDCNameEx_args_out(struct netr_DsRGetDCNameEx *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_info);
	}
	if (result_size == 1) {
		result = py_info;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsRGetSiteName_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		if (object->in.computer_name == NULL) {
			py_computer_name = Py_None;
			Py_INCREF(py_computer_name);
		} else {
			py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
		}
	}
	return py_computer_name;
}

static int py_netr_DsRGetSiteName_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.computer_name = NULL;
	} else {
		object->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.computer_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetSiteName_out_get_site(PyObject *obj, void *closure)
{
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(obj);
	PyObject *py_site;
	if (object->out.site == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.site == NULL) {
		py_site = Py_None;
		Py_INCREF(py_site);
	} else {
		if (*object->out.site == NULL) {
			py_site = Py_None;
			Py_INCREF(py_site);
		} else {
			py_site = PyUnicode_Decode(*object->out.site, strlen(*object->out.site), "utf-8", "ignore");
		}
	}
	return py_site;
}

static int py_netr_DsRGetSiteName_out_set_site(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.site));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.site");
		return -1;
	}
	object->out.site = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.site);
	if (object->out.site == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.site = NULL;
	} else {
		*object->out.site = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			*object->out.site = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetSiteName_get_result(PyObject *obj, void *closure)
{
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsRGetSiteName_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsRGetSiteName_getsetters[] = {
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_DsRGetSiteName_in_get_computer_name,
		.set = py_netr_DsRGetSiteName_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_site"),
		.get = py_netr_DsRGetSiteName_out_get_site,
		.set = py_netr_DsRGetSiteName_out_set_site,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsRGetSiteName_get_result,
		.set = py_netr_DsRGetSiteName_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsRGetSiteName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsRGetSiteName, type);
	return self;
}

static PyObject *py_netr_DsRGetSiteName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(28);
}

static PyObject *py_netr_DsRGetSiteName_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 29) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[28];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsRGetSiteName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsRGetSiteName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsRGetSiteName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 29) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[28];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRGetSiteName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetSiteName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetSiteName_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetSiteName *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 29) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[28];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsRGetSiteName_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetSiteName_ndr_print(py_obj, args, kwargs, "netr_DsRGetSiteName_in", NDR_IN);
}

static PyObject *py_netr_DsRGetSiteName_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetSiteName_ndr_print(py_obj, args, kwargs, "netr_DsRGetSiteName_out", NDR_OUT);
}

static PyMethodDef py_netr_DsRGetSiteName_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsRGetSiteName_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsRGetSiteName.opnum() -> 28 (0x1c) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRGetSiteName_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRGetSiteName",
	.tp_getset = py_netr_DsRGetSiteName_getsetters,
	.tp_methods = py_netr_DsRGetSiteName_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRGetSiteName_new,
};

static bool pack_py_netr_DsRGetSiteName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetSiteName *r)
{
	PyObject *py_computer_name;
	const char *kwnames[] = {
		"computer_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsRGetSiteName", discard_const_p(char *, kwnames), &py_computer_name)) {
		return false;
	}

	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	if (py_computer_name == Py_None) {
		r->in.computer_name = NULL;
	} else {
		r->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_computer_name)) {
				unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_computer_name)) {
				test_str = PyBytes_AS_STRING(py_computer_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.computer_name = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsRGetSiteName_args_out(struct netr_DsRGetSiteName *r, bool raise_result_exception)
{
	PyObject *py_site = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.site == NULL) {
		py_site = Py_None;
		Py_INCREF(py_site);
	} else {
		if (*r->out.site == NULL) {
			py_site = Py_None;
			Py_INCREF(py_site);
		} else {
			py_site = PyUnicode_Decode(*r->out.site, strlen(*r->out.site), "utf-8", "ignore");
		}
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_site);
	}
	if (result_size == 1) {
		result = py_site;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonGetDomainInfo_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
	}
	return py_server_name;
}

static int py_netr_LogonGetDomainInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
	if (object->in.server_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.server_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		if (object->in.computer_name == NULL) {
			py_computer_name = Py_None;
			Py_INCREF(py_computer_name);
		} else {
			py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
		}
	}
	return py_computer_name;
}

static int py_netr_LogonGetDomainInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.computer_name = NULL;
	} else {
		object->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.computer_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_LogonGetDomainInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_LogonGetDomainInfo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
	if (object->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_LogonGetDomainInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_in_get_level(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_level;
	py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
	return py_level;
}

static int py_netr_LogonGetDomainInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_in_get_query(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_query;
	if (object->in.query == NULL) {
		Py_RETURN_NONE;
	}
	py_query = pyrpc_import_union(&netr_WorkstationInfo_Type, object->in.query, object->in.level, object->in.query, "union netr_WorkstationInfo");
	if (py_query == NULL) {
		return NULL;
	}
	return py_query;
}

static int py_netr_LogonGetDomainInfo_in_set_query(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.query));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.query");
		return -1;
	}
	object->in.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.query);
	if (object->in.query == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_WorkstationInfo *query_switch_1;
		query_switch_1 = (union netr_WorkstationInfo *)pyrpc_export_union(&netr_WorkstationInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_WorkstationInfo");
		if (query_switch_1 == NULL) {
			return -1;
		}
		object->in.query = query_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_out_get_info(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	py_info = pyrpc_import_union(&netr_DomainInfo_Type, object->out.info, object->in.level, object->out.info, "union netr_DomainInfo");
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_netr_LogonGetDomainInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
	if (object->out.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_DomainInfo *info_switch_1;
		info_switch_1 = (union netr_DomainInfo *)pyrpc_export_union(&netr_DomainInfo_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union netr_DomainInfo");
		if (info_switch_1 == NULL) {
			return -1;
		}
		object->out.info = info_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonGetDomainInfo_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_LogonGetDomainInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonGetDomainInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonGetDomainInfo_in_get_server_name,
		.set = py_netr_LogonGetDomainInfo_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_LogonGetDomainInfo_in_get_computer_name,
		.set = py_netr_LogonGetDomainInfo_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_LogonGetDomainInfo_in_get_credential,
		.set = py_netr_LogonGetDomainInfo_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_LogonGetDomainInfo_in_get_return_authenticator,
		.set = py_netr_LogonGetDomainInfo_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_LogonGetDomainInfo_out_get_return_authenticator,
		.set = py_netr_LogonGetDomainInfo_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_level"),
		.get = py_netr_LogonGetDomainInfo_in_get_level,
		.set = py_netr_LogonGetDomainInfo_in_set_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_query"),
		.get = py_netr_LogonGetDomainInfo_in_get_query,
		.set = py_netr_LogonGetDomainInfo_in_set_query,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationInfo")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_netr_LogonGetDomainInfo_out_get_info,
		.set = py_netr_LogonGetDomainInfo_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainInfo")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonGetDomainInfo_get_result,
		.set = py_netr_LogonGetDomainInfo_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonGetDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonGetDomainInfo, type);
	struct netr_LogonGetDomainInfo *_self = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.query = talloc_zero(mem_ctx, union netr_WorkstationInfo);
	_self->out.info = talloc_zero(mem_ctx, union netr_DomainInfo);
	return self;
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(29);
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 30) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[29];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 30) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[29];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonGetDomainInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 30) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[29];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonGetDomainInfo_ndr_print(py_obj, args, kwargs, "netr_LogonGetDomainInfo_in", NDR_IN);
}

static PyObject *py_netr_LogonGetDomainInfo_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonGetDomainInfo_ndr_print(py_obj, args, kwargs, "netr_LogonGetDomainInfo_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonGetDomainInfo_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonGetDomainInfo.opnum() -> 29 (0x1d) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonGetDomainInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonGetDomainInfo",
	.tp_getset = py_netr_LogonGetDomainInfo_getsetters,
	.tp_methods = py_netr_LogonGetDomainInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonGetDomainInfo_new,
};

static bool pack_py_netr_LogonGetDomainInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetDomainInfo *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_level;
	PyObject *py_query;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "return_authenticator", "level", "query", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_LogonGetDomainInfo", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_level, &py_query)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	r->in.server_name = talloc_ptrtype(r, r->in.server_name);
	if (r->in.server_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_server_name)) {
			unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_server_name)) {
			test_str = PyBytes_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;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.server_name = talloc_str;
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	if (py_computer_name == Py_None) {
		r->in.computer_name = NULL;
	} else {
		r->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_computer_name)) {
				unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_computer_name)) {
				test_str = PyBytes_AS_STRING(py_computer_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.computer_name = talloc_str;
		}
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
	if (r->in.return_authenticator == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	if (py_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
		if (PyLong_Check(py_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_query == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.query");
		return false;
	}
	r->in.query = talloc_ptrtype(r, r->in.query);
	if (r->in.query == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		union netr_WorkstationInfo *query_switch_1;
		query_switch_1 = (union netr_WorkstationInfo *)pyrpc_export_union(&netr_WorkstationInfo_Type, r, r->in.level, py_query, "union netr_WorkstationInfo");
		if (query_switch_1 == NULL) {
			return false;
		}
		r->in.query = query_switch_1;
	}
	return true;
}

static PyObject *unpack_py_netr_LogonGetDomainInfo_args_out(struct netr_LogonGetDomainInfo *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_info = pyrpc_import_union(&netr_DomainInfo_Type, r->out.info, r->in.level, r->out.info, "union netr_DomainInfo");
	if (py_info == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_info);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerPasswordSet2_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerPasswordSet2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet2_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerPasswordSet2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet2_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerPasswordSet2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet2_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerPasswordSet2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordSet2_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_ServerPasswordSet2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordSet2_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_ServerPasswordSet2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordSet2_in_get_new_password(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_new_password;
	if (object->in.new_password == NULL) {
		Py_RETURN_NONE;
	}
	py_new_password = pytalloc_reference_ex(&netr_CryptPassword_Type, object->in.new_password, object->in.new_password);
	return py_new_password;
}

static int py_netr_ServerPasswordSet2_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.new_password");
		return -1;
	}
	object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
	if (object->in.new_password == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_CryptPassword_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordSet2_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerPasswordSet2_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerPasswordSet2_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerPasswordSet2_in_get_server_name,
		.set = py_netr_ServerPasswordSet2_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerPasswordSet2_in_get_account_name,
		.set = py_netr_ServerPasswordSet2_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerPasswordSet2_in_get_secure_channel_type,
		.set = py_netr_ServerPasswordSet2_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerPasswordSet2_in_get_computer_name,
		.set = py_netr_ServerPasswordSet2_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_ServerPasswordSet2_in_get_credential,
		.set = py_netr_ServerPasswordSet2_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_ServerPasswordSet2_out_get_return_authenticator,
		.set = py_netr_ServerPasswordSet2_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_new_password"),
		.get = py_netr_ServerPasswordSet2_in_get_new_password,
		.set = py_netr_ServerPasswordSet2_in_set_new_password,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_CryptPassword")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerPasswordSet2_get_result,
		.set = py_netr_ServerPasswordSet2_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerPasswordSet2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerPasswordSet2, type);
	struct netr_ServerPasswordSet2 *_self = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.new_password = talloc_zero(mem_ctx, struct netr_CryptPassword);
	return self;
}

static PyObject *py_netr_ServerPasswordSet2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(30);
}

static PyObject *py_netr_ServerPasswordSet2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 31) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[30];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerPasswordSet2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerPasswordSet2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerPasswordSet2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 31) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[30];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerPasswordSet2_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordSet2 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 31) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[30];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerPasswordSet2_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerPasswordSet2_ndr_print(py_obj, args, kwargs, "netr_ServerPasswordSet2_in", NDR_IN);
}

static PyObject *py_netr_ServerPasswordSet2_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerPasswordSet2_ndr_print(py_obj, args, kwargs, "netr_ServerPasswordSet2_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerPasswordSet2_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerPasswordSet2_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerPasswordSet2.opnum() -> 30 (0x1e) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerPasswordSet2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerPasswordSet2",
	.tp_getset = py_netr_ServerPasswordSet2_getsetters,
	.tp_methods = py_netr_ServerPasswordSet2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerPasswordSet2_new,
};

static bool pack_py_netr_ServerPasswordSet2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet2 *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_new_password;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_ServerPasswordSet2", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential, &py_new_password)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_new_password == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.new_password");
		return false;
	}
	r->in.new_password = talloc_ptrtype(r, r->in.new_password);
	if (r->in.new_password == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_CryptPassword_Type, py_new_password, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(py_new_password);
	return true;
}

static PyObject *unpack_py_netr_ServerPasswordSet2_args_out(struct netr_ServerPasswordSet2 *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_return_authenticator);
	}
	if (result_size == 1) {
		result = py_return_authenticator;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerPasswordGet_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerPasswordGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordGet_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerPasswordGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordGet_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerPasswordGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordGet_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerPasswordGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerPasswordGet_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_ServerPasswordGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordGet_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_ServerPasswordGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordGet_out_get_password(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_password;
	if (object->out.password == NULL) {
		Py_RETURN_NONE;
	}
	py_password = pytalloc_reference_ex(samr_Password_Type, object->out.password, object->out.password);
	return py_password;
}

static int py_netr_ServerPasswordGet_out_set_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.password));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.password");
		return -1;
	}
	object->out.password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.password);
	if (object->out.password == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.password = (struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerPasswordGet_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerPasswordGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerPasswordGet_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerPasswordGet_in_get_server_name,
		.set = py_netr_ServerPasswordGet_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerPasswordGet_in_get_account_name,
		.set = py_netr_ServerPasswordGet_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerPasswordGet_in_get_secure_channel_type,
		.set = py_netr_ServerPasswordGet_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerPasswordGet_in_get_computer_name,
		.set = py_netr_ServerPasswordGet_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_ServerPasswordGet_in_get_credential,
		.set = py_netr_ServerPasswordGet_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_ServerPasswordGet_out_get_return_authenticator,
		.set = py_netr_ServerPasswordGet_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_password"),
		.get = py_netr_ServerPasswordGet_out_get_password,
		.set = py_netr_ServerPasswordGet_out_set_password,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerPasswordGet_get_result,
		.set = py_netr_ServerPasswordGet_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerPasswordGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerPasswordGet, type);
	struct netr_ServerPasswordGet *_self = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.password = talloc_zero(mem_ctx, struct samr_Password);
	return self;
}

static PyObject *py_netr_ServerPasswordGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(31);
}

static PyObject *py_netr_ServerPasswordGet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 32) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[31];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerPasswordGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerPasswordGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerPasswordGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 32) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[31];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerPasswordGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerPasswordGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerPasswordGet_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerPasswordGet *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 32) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[31];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerPasswordGet_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerPasswordGet_ndr_print(py_obj, args, kwargs, "netr_ServerPasswordGet_in", NDR_IN);
}

static PyObject *py_netr_ServerPasswordGet_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerPasswordGet_ndr_print(py_obj, args, kwargs, "netr_ServerPasswordGet_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerPasswordGet_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerPasswordGet_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerPasswordGet.opnum() -> 31 (0x1f) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerPasswordGet_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerPasswordGet",
	.tp_getset = py_netr_ServerPasswordGet_getsetters,
	.tp_methods = py_netr_ServerPasswordGet_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerPasswordGet_new,
};

static bool pack_py_netr_ServerPasswordGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordGet *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credential;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerPasswordGet", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	return true;
}

static PyObject *unpack_py_netr_ServerPasswordGet_args_out(struct netr_ServerPasswordGet *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_password = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_password = pytalloc_reference_ex(samr_Password_Type, r->out.password, r->out.password);
	PyTuple_SetItem(result, 1, py_password);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_NetrLogonSendToSam_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_NetrLogonSendToSam_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_NetrLogonSendToSam_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_NetrLogonSendToSam_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_NetrLogonSendToSam_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_NetrLogonSendToSam_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_NetrLogonSendToSam_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_NetrLogonSendToSam_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_NetrLogonSendToSam_in_get_opaque_buffer(PyObject *obj, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
	PyObject *py_opaque_buffer;
	if (object->in.opaque_buffer == NULL) {
		Py_RETURN_NONE;
	}
	py_opaque_buffer = PyList_New(object->in.buffer_len);
	if (py_opaque_buffer == NULL) {
		return NULL;
	}
	{
		int opaque_buffer_cntr_1;
		for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < (object->in.buffer_len); opaque_buffer_cntr_1++) {
			PyObject *py_opaque_buffer_1;
			py_opaque_buffer_1 = PyLong_FromLong((uint16_t)((object->in.opaque_buffer)[opaque_buffer_cntr_1]));
			PyList_SetItem(py_opaque_buffer, opaque_buffer_cntr_1, py_opaque_buffer_1);
		}
	}
	return py_opaque_buffer;
}

static int py_netr_NetrLogonSendToSam_in_set_opaque_buffer(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.opaque_buffer));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.opaque_buffer");
		return -1;
	}
	object->in.opaque_buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer);
	if (object->in.opaque_buffer == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int opaque_buffer_cntr_1;
		object->in.opaque_buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer, PyList_GET_SIZE(value));
		if (!object->in.opaque_buffer) { return -1; }
		talloc_set_name_const(object->in.opaque_buffer, "ARRAY: object->in.opaque_buffer");
		for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(value); opaque_buffer_cntr_1++) {
			if (PyList_GET_ITEM(value, opaque_buffer_cntr_1) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->in.opaque_buffer)[opaque_buffer_cntr_1]");
				return -1;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->in.opaque_buffer)[opaque_buffer_cntr_1]));
				if (PyLong_Check(PyList_GET_ITEM(value, opaque_buffer_cntr_1))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, opaque_buffer_cntr_1));
					if (PyErr_Occurred() != NULL) {
						return -1;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return -1;
					}
					(object->in.opaque_buffer)[opaque_buffer_cntr_1] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return -1;
				}
			}
		}
	}
	return 0;
}

static PyObject *py_netr_NetrLogonSendToSam_in_get_buffer_len(PyObject *obj, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
	PyObject *py_buffer_len;
	py_buffer_len = PyLong_FromUnsignedLongLong((uint32_t)(object->in.buffer_len));
	return py_buffer_len;
}

static int py_netr_NetrLogonSendToSam_in_set_buffer_len(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.buffer_len");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffer_len));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.buffer_len = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_NetrLogonSendToSam_get_result(PyObject *obj, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_NetrLogonSendToSam_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_NetrLogonSendToSam_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_NetrLogonSendToSam_in_get_server_name,
		.set = py_netr_NetrLogonSendToSam_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_NetrLogonSendToSam_in_get_computer_name,
		.set = py_netr_NetrLogonSendToSam_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_NetrLogonSendToSam_in_get_credential,
		.set = py_netr_NetrLogonSendToSam_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_NetrLogonSendToSam_out_get_return_authenticator,
		.set = py_netr_NetrLogonSendToSam_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_opaque_buffer"),
		.get = py_netr_NetrLogonSendToSam_in_get_opaque_buffer,
		.set = py_netr_NetrLogonSendToSam_in_set_opaque_buffer,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "in_buffer_len"),
		.get = py_netr_NetrLogonSendToSam_in_get_buffer_len,
		.set = py_netr_NetrLogonSendToSam_in_set_buffer_len,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_NetrLogonSendToSam_get_result,
		.set = py_netr_NetrLogonSendToSam_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_NetrLogonSendToSam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_NetrLogonSendToSam, type);
	struct netr_NetrLogonSendToSam *_self = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.opaque_buffer = talloc_zero(mem_ctx, uint8_t);
	return self;
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(32);
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 33) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[32];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 33) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[32];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrLogonSendToSam *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 33) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[32];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_NetrLogonSendToSam_ndr_print(py_obj, args, kwargs, "netr_NetrLogonSendToSam_in", NDR_IN);
}

static PyObject *py_netr_NetrLogonSendToSam_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_NetrLogonSendToSam_ndr_print(py_obj, args, kwargs, "netr_NetrLogonSendToSam_out", NDR_OUT);
}

static PyMethodDef py_netr_NetrLogonSendToSam_methods[] = {
	{ "opnum", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_NetrLogonSendToSam.opnum() -> 32 (0x20) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_NetrLogonSendToSam_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NetrLogonSendToSam",
	.tp_getset = py_netr_NetrLogonSendToSam_getsetters,
	.tp_methods = py_netr_NetrLogonSendToSam_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NetrLogonSendToSam_new,
};

static bool pack_py_netr_NetrLogonSendToSam_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrLogonSendToSam *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_opaque_buffer;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "opaque_buffer", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_NetrLogonSendToSam", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_opaque_buffer)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_opaque_buffer == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.opaque_buffer");
		return false;
	}
	r->in.opaque_buffer = talloc_ptrtype(r, r->in.opaque_buffer);
	if (r->in.opaque_buffer == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
	{
		int opaque_buffer_cntr_1;
		r->in.opaque_buffer = talloc_array_ptrtype(r, r->in.opaque_buffer, PyList_GET_SIZE(py_opaque_buffer));
		if (!r->in.opaque_buffer) { return false; }
		talloc_set_name_const(r->in.opaque_buffer, "ARRAY: r->in.opaque_buffer");
		for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(py_opaque_buffer); opaque_buffer_cntr_1++) {
			if (PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (r->in.opaque_buffer)[opaque_buffer_cntr_1]");
				return false;
			}
			{
				const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((r->in.opaque_buffer)[opaque_buffer_cntr_1]));
				if (PyLong_Check(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1))) {
					unsigned long long test_var;
					test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1));
					if (PyErr_Occurred() != NULL) {
						return false;
					}
					if (test_var > uint_max) {
						PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
						  PyLong_Type.tp_name, uint_max, test_var);
						return false;
					}
					(r->in.opaque_buffer)[opaque_buffer_cntr_1] = test_var;
				} else {
					PyErr_Format(PyExc_TypeError, "Expected type %s",
					  PyLong_Type.tp_name);
					return false;
				}
			}
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
	r->in.buffer_len = PyList_GET_SIZE(py_opaque_buffer);
	return true;
}

static PyObject *unpack_py_netr_NetrLogonSendToSam_args_out(struct netr_NetrLogonSendToSam *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_return_authenticator);
	}
	if (result_size == 1) {
		result = py_return_authenticator;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsRAddressToSitenamesW_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_DsRAddressToSitenamesW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesW_in_get_count(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->in.count));
	return py_count;
}

static int py_netr_DsRAddressToSitenamesW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesW_in_get_addresses(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
	PyObject *py_addresses;
	if (object->in.addresses == NULL) {
		Py_RETURN_NONE;
	}
	py_addresses = PyList_New(object->in.count);
	if (py_addresses == NULL) {
		return NULL;
	}
	{
		int addresses_cntr_1;
		for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
			PyObject *py_addresses_1;
			py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &(object->in.addresses)[addresses_cntr_1]);
			PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
		}
	}
	return py_addresses;
}

static int py_netr_DsRAddressToSitenamesW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.addresses");
		return -1;
	}
	object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
	if (object->in.addresses == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int addresses_cntr_1;
		object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
		if (!object->in.addresses) { return -1; }
		talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
		for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
			if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->in.addresses)[addresses_cntr_1]");
				return -1;
			}
			PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
			if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			(object->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesW_out_get_ctr(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
	PyObject *py_ctr;
	if (object->out.ctr == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.ctr == NULL) {
		py_ctr = Py_None;
		Py_INCREF(py_ctr);
	} else {
		py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *object->out.ctr, *object->out.ctr);
	}
	return py_ctr;
}

static int py_netr_DsRAddressToSitenamesW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ctr");
		return -1;
	}
	object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
	if (object->out.ctr == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.ctr = NULL;
	} else {
		*object->out.ctr = NULL;
		PY_CHECK_TYPE(&netr_DsRAddressToSitenamesWCtr_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.ctr = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesW_get_result(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsRAddressToSitenamesW_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsRAddressToSitenamesW_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_DsRAddressToSitenamesW_in_get_server_name,
		.set = py_netr_DsRAddressToSitenamesW_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_count"),
		.get = py_netr_DsRAddressToSitenamesW_in_get_count,
		.set = py_netr_DsRAddressToSitenamesW_in_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_addresses"),
		.get = py_netr_DsRAddressToSitenamesW_in_get_addresses,
		.set = py_netr_DsRAddressToSitenamesW_in_set_addresses,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
	},
	{
		.name = discard_const_p(char, "out_ctr"),
		.get = py_netr_DsRAddressToSitenamesW_out_get_ctr,
		.set = py_netr_DsRAddressToSitenamesW_out_set_ctr,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesWCtr")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsRAddressToSitenamesW_get_result,
		.set = py_netr_DsRAddressToSitenamesW_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsRAddressToSitenamesW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesW, type);
	struct netr_DsRAddressToSitenamesW *_self = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
	/* a pointer to a NULL pointer */
	_self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesWCtr *);
	return self;
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(33);
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 34) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[33];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 34) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[33];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRAddressToSitenamesW *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 34) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[33];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, args, kwargs, "netr_DsRAddressToSitenamesW_in", NDR_IN);
}

static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, args, kwargs, "netr_DsRAddressToSitenamesW_out", NDR_OUT);
}

static PyMethodDef py_netr_DsRAddressToSitenamesW_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsRAddressToSitenamesW.opnum() -> 33 (0x21) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRAddressToSitenamesW_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRAddressToSitenamesW",
	.tp_getset = py_netr_DsRAddressToSitenamesW_getsetters,
	.tp_methods = py_netr_DsRAddressToSitenamesW_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRAddressToSitenamesW_new,
};

static bool pack_py_netr_DsRAddressToSitenamesW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesW *r)
{
	PyObject *py_server_name;
	PyObject *py_addresses;
	const char *kwnames[] = {
		"server_name", "addresses", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
	r->in.count = PyList_GET_SIZE(py_addresses);
	if (py_addresses == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.addresses");
		return false;
	}
	r->in.addresses = talloc_ptrtype(r, r->in.addresses);
	if (r->in.addresses == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
	{
		int addresses_cntr_1;
		r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
		if (!r->in.addresses) { return false; }
		talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
		for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
			if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (r->in.addresses)[addresses_cntr_1]");
				return false;
			}
			PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
			if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
				PyErr_NoMemory();
				return false;
			}
			(r->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsRAddressToSitenamesW_args_out(struct netr_DsRAddressToSitenamesW *r, bool raise_result_exception)
{
	PyObject *py_ctr = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.ctr == NULL) {
		py_ctr = Py_None;
		Py_INCREF(py_ctr);
	} else {
		py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *r->out.ctr, *r->out.ctr);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_ctr);
	}
	if (result_size == 1) {
		result = py_ctr;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsRGetDCNameEx2_in_get_server_unc(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_server_unc;
	if (object->in.server_unc == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_unc == NULL) {
		py_server_unc = Py_None;
		Py_INCREF(py_server_unc);
	} else {
		if (object->in.server_unc == NULL) {
			py_server_unc = Py_None;
			Py_INCREF(py_server_unc);
		} else {
			py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
		}
	}
	return py_server_unc;
}

static int py_netr_DsRGetDCNameEx2_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_unc");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_unc = NULL;
	} else {
		object->in.server_unc = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_unc = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_in_get_client_account(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_client_account;
	if (object->in.client_account == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.client_account == NULL) {
		py_client_account = Py_None;
		Py_INCREF(py_client_account);
	} else {
		if (object->in.client_account == NULL) {
			py_client_account = Py_None;
			Py_INCREF(py_client_account);
		} else {
			py_client_account = PyUnicode_Decode(object->in.client_account, strlen(object->in.client_account), "utf-8", "ignore");
		}
	}
	return py_client_account;
}

static int py_netr_DsRGetDCNameEx2_in_set_client_account(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.client_account");
		return -1;
	}
	if (value == Py_None) {
		object->in.client_account = NULL;
	} else {
		object->in.client_account = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.client_account = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_in_get_mask(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_mask;
	py_mask = PyLong_FromUnsignedLongLong((uint32_t)(object->in.mask));
	return py_mask;
}

static int py_netr_DsRGetDCNameEx2_in_set_mask(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.mask");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.mask));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.mask = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_name;
	if (object->in.domain_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_name == NULL) {
		py_domain_name = Py_None;
		Py_INCREF(py_domain_name);
	} else {
		if (object->in.domain_name == NULL) {
			py_domain_name = Py_None;
			Py_INCREF(py_domain_name);
		} else {
			py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
		}
	}
	return py_domain_name;
}

static int py_netr_DsRGetDCNameEx2_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_name = NULL;
	} else {
		object->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.domain_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_guid(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_guid;
	if (object->in.domain_guid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_guid == NULL) {
		py_domain_guid = Py_None;
		Py_INCREF(py_domain_guid);
	} else {
		py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
	}
	return py_domain_guid;
}

static int py_netr_DsRGetDCNameEx2_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_guid = NULL;
	} else {
		object->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_in_get_site_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_site_name;
	if (object->in.site_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.site_name == NULL) {
		py_site_name = Py_None;
		Py_INCREF(py_site_name);
	} else {
		if (object->in.site_name == NULL) {
			py_site_name = Py_None;
			Py_INCREF(py_site_name);
		} else {
			py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
		}
	}
	return py_site_name;
}

static int py_netr_DsRGetDCNameEx2_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.site_name = NULL;
	} else {
		object->in.site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.site_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_in_get_flags(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_netr_DsRGetDCNameEx2_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_out_get_info(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_info;
	if (object->out.info == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
	}
	return py_info;
}

static int py_netr_DsRGetDCNameEx2_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.info");
		return -1;
	}
	object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
	if (object->out.info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.info = NULL;
	} else {
		*object->out.info = NULL;
		PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetDCNameEx2_get_result(PyObject *obj, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsRGetDCNameEx2_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsRGetDCNameEx2_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_unc"),
		.get = py_netr_DsRGetDCNameEx2_in_get_server_unc,
		.set = py_netr_DsRGetDCNameEx2_in_set_server_unc,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_client_account"),
		.get = py_netr_DsRGetDCNameEx2_in_get_client_account,
		.set = py_netr_DsRGetDCNameEx2_in_set_client_account,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_mask"),
		.get = py_netr_DsRGetDCNameEx2_in_get_mask,
		.set = py_netr_DsRGetDCNameEx2_in_set_mask,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
	},
	{
		.name = discard_const_p(char, "in_domain_name"),
		.get = py_netr_DsRGetDCNameEx2_in_get_domain_name,
		.set = py_netr_DsRGetDCNameEx2_in_set_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain_guid"),
		.get = py_netr_DsRGetDCNameEx2_in_get_domain_guid,
		.set = py_netr_DsRGetDCNameEx2_in_set_domain_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "in_site_name"),
		.get = py_netr_DsRGetDCNameEx2_in_get_site_name,
		.set = py_netr_DsRGetDCNameEx2_in_set_site_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_netr_DsRGetDCNameEx2_in_get_flags,
		.set = py_netr_DsRGetDCNameEx2_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
	},
	{
		.name = discard_const_p(char, "out_info"),
		.get = py_netr_DsRGetDCNameEx2_out_get_info,
		.set = py_netr_DsRGetDCNameEx2_out_set_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsRGetDCNameEx2_get_result,
		.set = py_netr_DsRGetDCNameEx2_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsRGetDCNameEx2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx2, type);
	struct netr_DsRGetDCNameEx2 *_self = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	/* a pointer to a NULL pointer */
	_self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
	return self;
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(34);
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 35) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[34];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 35) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[34];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetDCNameEx2 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 35) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[34];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, args, kwargs, "netr_DsRGetDCNameEx2_in", NDR_IN);
}

static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, args, kwargs, "netr_DsRGetDCNameEx2_out", NDR_OUT);
}

static PyMethodDef py_netr_DsRGetDCNameEx2_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsRGetDCNameEx2.opnum() -> 34 (0x22) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRGetDCNameEx2_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRGetDCNameEx2",
	.tp_getset = py_netr_DsRGetDCNameEx2_getsetters,
	.tp_methods = py_netr_DsRGetDCNameEx2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRGetDCNameEx2_new,
};

static bool pack_py_netr_DsRGetDCNameEx2_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx2 *r)
{
	PyObject *py_server_unc;
	PyObject *py_client_account;
	PyObject *py_mask;
	PyObject *py_domain_name;
	PyObject *py_domain_guid;
	PyObject *py_site_name;
	PyObject *py_flags;
	const char *kwnames[] = {
		"server_unc", "client_account", "mask", "domain_name", "domain_guid", "site_name", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:netr_DsRGetDCNameEx2", discard_const_p(char *, kwnames), &py_server_unc, &py_client_account, &py_mask, &py_domain_name, &py_domain_guid, &py_site_name, &py_flags)) {
		return false;
	}

	if (py_server_unc == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_unc");
		return false;
	}
	if (py_server_unc == Py_None) {
		r->in.server_unc = NULL;
	} else {
		r->in.server_unc = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_unc)) {
				unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_unc)) {
				test_str = PyBytes_AS_STRING(py_server_unc);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_unc = talloc_str;
		}
	}
	if (py_client_account == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.client_account");
		return false;
	}
	if (py_client_account == Py_None) {
		r->in.client_account = NULL;
	} else {
		r->in.client_account = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_client_account)) {
				unicode = PyUnicode_AsEncodedString(py_client_account, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_client_account)) {
				test_str = PyBytes_AS_STRING(py_client_account);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_account)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.client_account = talloc_str;
		}
	}
	if (py_mask == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.mask");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.mask));
		if (PyLong_Check(py_mask)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_mask);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.mask = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_domain_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_name");
		return false;
	}
	if (py_domain_name == Py_None) {
		r->in.domain_name = NULL;
	} else {
		r->in.domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_domain_name)) {
				unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_domain_name)) {
				test_str = PyBytes_AS_STRING(py_domain_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.domain_name = talloc_str;
		}
	}
	if (py_domain_guid == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
		return false;
	}
	if (py_domain_guid == Py_None) {
		r->in.domain_guid = NULL;
	} else {
		r->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
	}
	if (py_site_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_name");
		return false;
	}
	if (py_site_name == Py_None) {
		r->in.site_name = NULL;
	} else {
		r->in.site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_site_name)) {
				unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_site_name)) {
				test_str = PyBytes_AS_STRING(py_site_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.site_name = talloc_str;
		}
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsRGetDCNameEx2_args_out(struct netr_DsRGetDCNameEx2 *r, bool raise_result_exception)
{
	PyObject *py_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.info == NULL) {
		py_info = Py_None;
		Py_INCREF(py_info);
	} else {
		py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_info);
	}
	if (result_size == 1) {
		result = py_info;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list(PyObject *obj, void *closure)
{
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(obj);
	PyObject *py_dom_trust_list;
	if (object->out.dom_trust_list == NULL) {
		Py_RETURN_NONE;
	}
	py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.dom_trust_list, object->out.dom_trust_list);
	return py_dom_trust_list;
}

static int py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dom_trust_list));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dom_trust_list");
		return -1;
	}
	object->out.dom_trust_list = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dom_trust_list);
	if (object->out.dom_trust_list == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.dom_trust_list = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_get_result(PyObject *obj, void *closure)
{
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_NetrEnumerateTrustedDomainsEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_NetrEnumerateTrustedDomainsEx_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name,
		.set = py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_dom_trust_list"),
		.get = py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list,
		.set = py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_NetrEnumerateTrustedDomainsEx_get_result,
		.set = py_netr_NetrEnumerateTrustedDomainsEx_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomainsEx, type);
	struct netr_NetrEnumerateTrustedDomainsEx *_self = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.dom_trust_list = talloc_zero(mem_ctx, struct netr_DomainTrustList);
	return self;
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(36);
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 37) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[36];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 37) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[36];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_NetrEnumerateTrustedDomainsEx *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 37) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[36];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, args, kwargs, "netr_NetrEnumerateTrustedDomainsEx_in", NDR_IN);
}

static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, args, kwargs, "netr_NetrEnumerateTrustedDomainsEx_out", NDR_OUT);
}

static PyMethodDef py_netr_NetrEnumerateTrustedDomainsEx_methods[] = {
	{ "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_NetrEnumerateTrustedDomainsEx.opnum() -> 36 (0x24) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_NetrEnumerateTrustedDomainsEx",
	.tp_getset = py_netr_NetrEnumerateTrustedDomainsEx_getsetters,
	.tp_methods = py_netr_NetrEnumerateTrustedDomainsEx_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_NetrEnumerateTrustedDomainsEx_new,
};

static bool pack_py_netr_NetrEnumerateTrustedDomainsEx_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomainsEx *r)
{
	PyObject *py_server_name;
	const char *kwnames[] = {
		"server_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomainsEx", discard_const_p(char *, kwnames), &py_server_name)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_NetrEnumerateTrustedDomainsEx_args_out(struct netr_NetrEnumerateTrustedDomainsEx *r, bool raise_result_exception)
{
	PyObject *py_dom_trust_list = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.dom_trust_list, r->out.dom_trust_list);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_dom_trust_list);
	}
	if (result_size == 1) {
		result = py_dom_trust_list;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_DsRAddressToSitenamesExW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_count(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
	PyObject *py_count;
	py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->in.count));
	return py_count;
}

static int py_netr_DsRAddressToSitenamesExW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.count");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.count = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_addresses(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
	PyObject *py_addresses;
	if (object->in.addresses == NULL) {
		Py_RETURN_NONE;
	}
	py_addresses = PyList_New(object->in.count);
	if (py_addresses == NULL) {
		return NULL;
	}
	{
		int addresses_cntr_1;
		for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
			PyObject *py_addresses_1;
			py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &(object->in.addresses)[addresses_cntr_1]);
			PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
		}
	}
	return py_addresses;
}

static int py_netr_DsRAddressToSitenamesExW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.addresses");
		return -1;
	}
	object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
	if (object->in.addresses == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int addresses_cntr_1;
		object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
		if (!object->in.addresses) { return -1; }
		talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
		for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
			if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->in.addresses)[addresses_cntr_1]");
				return -1;
			}
			PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
			if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			(object->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
		}
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_out_get_ctr(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
	PyObject *py_ctr;
	if (object->out.ctr == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.ctr == NULL) {
		py_ctr = Py_None;
		Py_INCREF(py_ctr);
	} else {
		py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *object->out.ctr, *object->out.ctr);
	}
	return py_ctr;
}

static int py_netr_DsRAddressToSitenamesExW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ctr");
		return -1;
	}
	object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
	if (object->out.ctr == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.ctr = NULL;
	} else {
		*object->out.ctr = NULL;
		PY_CHECK_TYPE(&netr_DsRAddressToSitenamesExWCtr_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.ctr = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_get_result(PyObject *obj, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsRAddressToSitenamesExW_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsRAddressToSitenamesExW_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_DsRAddressToSitenamesExW_in_get_server_name,
		.set = py_netr_DsRAddressToSitenamesExW_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_count"),
		.get = py_netr_DsRAddressToSitenamesExW_in_get_count,
		.set = py_netr_DsRAddressToSitenamesExW_in_set_count,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_addresses"),
		.get = py_netr_DsRAddressToSitenamesExW_in_get_addresses,
		.set = py_netr_DsRAddressToSitenamesExW_in_set_addresses,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
	},
	{
		.name = discard_const_p(char, "out_ctr"),
		.get = py_netr_DsRAddressToSitenamesExW_out_get_ctr,
		.set = py_netr_DsRAddressToSitenamesExW_out_set_ctr,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesExWCtr")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsRAddressToSitenamesExW_get_result,
		.set = py_netr_DsRAddressToSitenamesExW_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsRAddressToSitenamesExW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesExW, type);
	struct netr_DsRAddressToSitenamesExW *_self = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
	/* a pointer to a NULL pointer */
	_self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesExWCtr *);
	return self;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(37);
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 38) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[37];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 38) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[37];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRAddressToSitenamesExW *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 38) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[37];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, args, kwargs, "netr_DsRAddressToSitenamesExW_in", NDR_IN);
}

static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, args, kwargs, "netr_DsRAddressToSitenamesExW_out", NDR_OUT);
}

static PyMethodDef py_netr_DsRAddressToSitenamesExW_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsRAddressToSitenamesExW.opnum() -> 37 (0x25) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRAddressToSitenamesExW_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRAddressToSitenamesExW",
	.tp_getset = py_netr_DsRAddressToSitenamesExW_getsetters,
	.tp_methods = py_netr_DsRAddressToSitenamesExW_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRAddressToSitenamesExW_new,
};

static bool pack_py_netr_DsRAddressToSitenamesExW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesExW *r)
{
	PyObject *py_server_name;
	PyObject *py_addresses;
	const char *kwnames[] = {
		"server_name", "addresses", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesExW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
	r->in.count = PyList_GET_SIZE(py_addresses);
	if (py_addresses == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.addresses");
		return false;
	}
	r->in.addresses = talloc_ptrtype(r, r->in.addresses);
	if (r->in.addresses == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
	{
		int addresses_cntr_1;
		r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
		if (!r->in.addresses) { return false; }
		talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
		for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
			if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
				PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (r->in.addresses)[addresses_cntr_1]");
				return false;
			}
			PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
			if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
				PyErr_NoMemory();
				return false;
			}
			(r->in.addresses)[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsRAddressToSitenamesExW_args_out(struct netr_DsRAddressToSitenamesExW *r, bool raise_result_exception)
{
	PyObject *py_ctr = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.ctr == NULL) {
		py_ctr = Py_None;
		Py_INCREF(py_ctr);
	} else {
		py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *r->out.ctr, *r->out.ctr);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_ctr);
	}
	if (result_size == 1) {
		result = py_ctr;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsrGetDcSiteCoverageW_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_DsrGetDcSiteCoverageW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_out_get_ctr(PyObject *obj, void *closure)
{
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(obj);
	PyObject *py_ctr;
	if (object->out.ctr == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.ctr == NULL) {
		py_ctr = Py_None;
		Py_INCREF(py_ctr);
	} else {
		py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *object->out.ctr, *object->out.ctr);
	}
	return py_ctr;
}

static int py_netr_DsrGetDcSiteCoverageW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ctr");
		return -1;
	}
	object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
	if (object->out.ctr == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.ctr = NULL;
	} else {
		*object->out.ctr = NULL;
		PY_CHECK_TYPE(&DcSitesCtr_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.ctr = (struct DcSitesCtr *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_get_result(PyObject *obj, void *closure)
{
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsrGetDcSiteCoverageW_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsrGetDcSiteCoverageW_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_DsrGetDcSiteCoverageW_in_get_server_name,
		.set = py_netr_DsrGetDcSiteCoverageW_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_ctr"),
		.get = py_netr_DsrGetDcSiteCoverageW_out_get_ctr,
		.set = py_netr_DsrGetDcSiteCoverageW_out_set_ctr,
		.doc = discard_const_p(char, "PIDL-generated element of base type DcSitesCtr")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsrGetDcSiteCoverageW_get_result,
		.set = py_netr_DsrGetDcSiteCoverageW_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsrGetDcSiteCoverageW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsrGetDcSiteCoverageW, type);
	struct netr_DsrGetDcSiteCoverageW *_self = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	/* a pointer to a NULL pointer */
	_self->out.ctr = talloc_zero(mem_ctx, struct DcSitesCtr *);
	return self;
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(38);
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 39) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[38];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 39) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[38];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrGetDcSiteCoverageW *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 39) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[38];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, args, kwargs, "netr_DsrGetDcSiteCoverageW_in", NDR_IN);
}

static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, args, kwargs, "netr_DsrGetDcSiteCoverageW_out", NDR_OUT);
}

static PyMethodDef py_netr_DsrGetDcSiteCoverageW_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsrGetDcSiteCoverageW.opnum() -> 38 (0x26) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsrGetDcSiteCoverageW_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsrGetDcSiteCoverageW",
	.tp_getset = py_netr_DsrGetDcSiteCoverageW_getsetters,
	.tp_methods = py_netr_DsrGetDcSiteCoverageW_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsrGetDcSiteCoverageW_new,
};

static bool pack_py_netr_DsrGetDcSiteCoverageW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrGetDcSiteCoverageW *r)
{
	PyObject *py_server_name;
	const char *kwnames[] = {
		"server_name", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsrGetDcSiteCoverageW", discard_const_p(char *, kwnames), &py_server_name)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsrGetDcSiteCoverageW_args_out(struct netr_DsrGetDcSiteCoverageW *r, bool raise_result_exception)
{
	PyObject *py_ctr = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.ctr == NULL) {
		py_ctr = Py_None;
		Py_INCREF(py_ctr);
	} else {
		py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *r->out.ctr, *r->out.ctr);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_ctr);
	}
	if (result_size == 1) {
		result = py_ctr;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonSamLogonEx_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_LogonSamLogonEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		if (object->in.computer_name == NULL) {
			py_computer_name = Py_None;
			Py_INCREF(py_computer_name);
		} else {
			py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
		}
	}
	return py_computer_name;
}

static int py_netr_LogonSamLogonEx_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.computer_name = NULL;
	} else {
		object->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.computer_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_in_get_logon_level(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_level;
	py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
	return py_logon_level;
}

static int py_netr_LogonSamLogonEx_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_in_get_logon(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_logon;
	if (object->in.logon == NULL) {
		Py_RETURN_NONE;
	}
	py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
	if (py_logon == NULL) {
		return NULL;
	}
	return py_logon;
}

static int py_netr_LogonSamLogonEx_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
		return -1;
	}
	object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
	if (object->in.logon == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_LogonLevel *logon_switch_1;
		logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
		if (logon_switch_1 == NULL) {
			return -1;
		}
		object->in.logon = logon_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_in_get_validation_level(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_validation_level;
	py_validation_level = PyLong_FromLong((uint16_t)(object->in.validation_level));
	return py_validation_level;
}

static int py_netr_LogonSamLogonEx_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.validation_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.validation_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_out_get_validation(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_validation;
	if (object->out.validation == NULL) {
		Py_RETURN_NONE;
	}
	py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
	if (py_validation == NULL) {
		return NULL;
	}
	return py_validation;
}

static int py_netr_LogonSamLogonEx_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.validation");
		return -1;
	}
	object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
	if (object->out.validation == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_Validation *validation_switch_1;
		validation_switch_1 = (union netr_Validation *)pyrpc_export_union(&netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->in.validation_level, value, "union netr_Validation");
		if (validation_switch_1 == NULL) {
			return -1;
		}
		object->out.validation = validation_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_out_get_authoritative(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_authoritative;
	if (object->out.authoritative == NULL) {
		Py_RETURN_NONE;
	}
	py_authoritative = PyLong_FromLong((uint16_t)(*object->out.authoritative));
	return py_authoritative;
}

static int py_netr_LogonSamLogonEx_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.authoritative");
		return -1;
	}
	object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
	if (object->out.authoritative == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.authoritative = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_in_get_flags(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	if (object->in.flags == NULL) {
		Py_RETURN_NONE;
	}
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.flags));
	return py_flags;
}

static int py_netr_LogonSamLogonEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
	if (object->in.flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_out_get_flags(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	if (object->out.flags == NULL) {
		Py_RETURN_NONE;
	}
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.flags));
	return py_flags;
}

static int py_netr_LogonSamLogonEx_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.flags");
		return -1;
	}
	object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
	if (object->out.flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonEx_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_LogonSamLogonEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonSamLogonEx_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonSamLogonEx_in_get_server_name,
		.set = py_netr_LogonSamLogonEx_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_LogonSamLogonEx_in_get_computer_name,
		.set = py_netr_LogonSamLogonEx_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_logon_level"),
		.get = py_netr_LogonSamLogonEx_in_get_logon_level,
		.set = py_netr_LogonSamLogonEx_in_set_logon_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
	},
	{
		.name = discard_const_p(char, "in_logon"),
		.get = py_netr_LogonSamLogonEx_in_get_logon,
		.set = py_netr_LogonSamLogonEx_in_set_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
	},
	{
		.name = discard_const_p(char, "in_validation_level"),
		.get = py_netr_LogonSamLogonEx_in_get_validation_level,
		.set = py_netr_LogonSamLogonEx_in_set_validation_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_validation"),
		.get = py_netr_LogonSamLogonEx_out_get_validation,
		.set = py_netr_LogonSamLogonEx_out_set_validation,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
	},
	{
		.name = discard_const_p(char, "out_authoritative"),
		.get = py_netr_LogonSamLogonEx_out_get_authoritative,
		.set = py_netr_LogonSamLogonEx_out_set_authoritative,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_netr_LogonSamLogonEx_in_get_flags,
		.set = py_netr_LogonSamLogonEx_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
	},
	{
		.name = discard_const_p(char, "out_flags"),
		.get = py_netr_LogonSamLogonEx_out_get_flags,
		.set = py_netr_LogonSamLogonEx_out_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonSamLogonEx_get_result,
		.set = py_netr_LogonSamLogonEx_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonSamLogonEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonSamLogonEx, type);
	struct netr_LogonSamLogonEx *_self = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
	_self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
	_self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
	_self->in.flags = talloc_zero(mem_ctx, uint32_t);
	_self->out.flags = talloc_zero(mem_ctx, uint32_t);
	return self;
}

static PyObject *py_netr_LogonSamLogonEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(39);
}

static PyObject *py_netr_LogonSamLogonEx_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 40) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[39];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonSamLogonEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogonEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogonEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 40) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[39];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogonEx_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogonEx *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 40) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[39];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonSamLogonEx_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogonEx_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogonEx_in", NDR_IN);
}

static PyObject *py_netr_LogonSamLogonEx_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogonEx_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogonEx_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonSamLogonEx_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonSamLogonEx_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonSamLogonEx.opnum() -> 39 (0x27) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonSamLogonEx_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonSamLogonEx",
	.tp_getset = py_netr_LogonSamLogonEx_getsetters,
	.tp_methods = py_netr_LogonSamLogonEx_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonSamLogonEx_new,
};

static bool pack_py_netr_LogonSamLogonEx_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonEx *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_logon_level;
	PyObject *py_logon;
	PyObject *py_validation_level;
	PyObject *py_flags;
	const char *kwnames[] = {
		"server_name", "computer_name", "logon_level", "logon", "validation_level", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_LogonSamLogonEx", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_logon_level, &py_logon, &py_validation_level, &py_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	if (py_computer_name == Py_None) {
		r->in.computer_name = NULL;
	} else {
		r->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_computer_name)) {
				unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_computer_name)) {
				test_str = PyBytes_AS_STRING(py_computer_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.computer_name = talloc_str;
		}
	}
	if (py_logon_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
		if (PyLong_Check(py_logon_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_logon_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_logon == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
		return false;
	}
	r->in.logon = talloc_ptrtype(r, r->in.logon);
	if (r->in.logon == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		union netr_LogonLevel *logon_switch_1;
		logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
		if (logon_switch_1 == NULL) {
			return false;
		}
		r->in.logon = logon_switch_1;
	}
	if (py_validation_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.validation_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
		if (PyLong_Check(py_validation_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_validation_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.validation_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	r->in.flags = talloc_ptrtype(r, r->in.flags);
	if (r->in.flags == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_LogonSamLogonEx_args_out(struct netr_LogonSamLogonEx *r, bool raise_result_exception)
{
	PyObject *py_validation = NULL;
	PyObject *py_authoritative = NULL;
	PyObject *py_flags = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
	if (py_validation == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 0, py_validation);

	py_authoritative = PyLong_FromLong((uint16_t)(*r->out.authoritative));
	PyTuple_SetItem(result, 1, py_authoritative);

	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.flags));
	PyTuple_SetItem(result, 2, py_flags);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_DsrEnumerateDomainTrusts_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags(PyObject *obj, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_flags;
	py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.trust_flags));
	return py_trust_flags;
}

static int py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.trust_flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.trust_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.trust_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_out_get_trusts(PyObject *obj, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
	PyObject *py_trusts;
	if (object->out.trusts == NULL) {
		Py_RETURN_NONE;
	}
	py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.trusts, object->out.trusts);
	return py_trusts;
}

static int py_netr_DsrEnumerateDomainTrusts_out_set_trusts(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusts));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.trusts");
		return -1;
	}
	object->out.trusts = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusts);
	if (object->out.trusts == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.trusts = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_get_result(PyObject *obj, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsrEnumerateDomainTrusts_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsrEnumerateDomainTrusts_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_DsrEnumerateDomainTrusts_in_get_server_name,
		.set = py_netr_DsrEnumerateDomainTrusts_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_trust_flags"),
		.get = py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags,
		.set = py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
	},
	{
		.name = discard_const_p(char, "out_trusts"),
		.get = py_netr_DsrEnumerateDomainTrusts_out_get_trusts,
		.set = py_netr_DsrEnumerateDomainTrusts_out_set_trusts,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsrEnumerateDomainTrusts_get_result,
		.set = py_netr_DsrEnumerateDomainTrusts_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsrEnumerateDomainTrusts_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsrEnumerateDomainTrusts, type);
	struct netr_DsrEnumerateDomainTrusts *_self = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->out.trusts = talloc_zero(mem_ctx, struct netr_DomainTrustList);
	return self;
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(40);
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 41) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[40];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 41) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[40];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrEnumerateDomainTrusts *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 41) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[40];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, args, kwargs, "netr_DsrEnumerateDomainTrusts_in", NDR_IN);
}

static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, args, kwargs, "netr_DsrEnumerateDomainTrusts_out", NDR_OUT);
}

static PyMethodDef py_netr_DsrEnumerateDomainTrusts_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsrEnumerateDomainTrusts.opnum() -> 40 (0x28) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsrEnumerateDomainTrusts_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsrEnumerateDomainTrusts",
	.tp_getset = py_netr_DsrEnumerateDomainTrusts_getsetters,
	.tp_methods = py_netr_DsrEnumerateDomainTrusts_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsrEnumerateDomainTrusts_new,
};

static bool pack_py_netr_DsrEnumerateDomainTrusts_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrEnumerateDomainTrusts *r)
{
	PyObject *py_server_name;
	PyObject *py_trust_flags;
	const char *kwnames[] = {
		"server_name", "trust_flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsrEnumerateDomainTrusts", discard_const_p(char *, kwnames), &py_server_name, &py_trust_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_trust_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.trust_flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.trust_flags));
		if (PyLong_Check(py_trust_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_trust_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.trust_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsrEnumerateDomainTrusts_args_out(struct netr_DsrEnumerateDomainTrusts *r, bool raise_result_exception)
{
	PyObject *py_trusts = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.trusts, r->out.trusts);
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_trusts);
	}
	if (result_size == 1) {
		result = py_trusts;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_DsrDeregisterDNSHostRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain(PyObject *obj, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_domain;
	if (object->in.domain == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain == NULL) {
		py_domain = Py_None;
		Py_INCREF(py_domain);
	} else {
		if (object->in.domain == NULL) {
			py_domain = Py_None;
			Py_INCREF(py_domain);
		} else {
			py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
		}
	}
	return py_domain;
}

static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain = NULL;
	} else {
		object->in.domain = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.domain = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid(PyObject *obj, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_domain_guid;
	if (object->in.domain_guid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.domain_guid == NULL) {
		py_domain_guid = Py_None;
		Py_INCREF(py_domain_guid);
	} else {
		py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
	}
	return py_domain_guid;
}

static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.domain_guid");
		return -1;
	}
	if (value == Py_None) {
		object->in.domain_guid = NULL;
	} else {
		object->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid(PyObject *obj, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_dsa_guid;
	if (object->in.dsa_guid == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.dsa_guid == NULL) {
		py_dsa_guid = Py_None;
		Py_INCREF(py_dsa_guid);
	} else {
		py_dsa_guid = pytalloc_reference_ex(GUID_Type, object->in.dsa_guid, object->in.dsa_guid);
	}
	return py_dsa_guid;
}

static int py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dsa_guid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dsa_guid");
		return -1;
	}
	if (value == Py_None) {
		object->in.dsa_guid = NULL;
	} else {
		object->in.dsa_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host(PyObject *obj, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_host;
	if (object->in.dns_host == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.dns_host == NULL) {
		py_dns_host = Py_None;
		Py_INCREF(py_dns_host);
	} else {
		py_dns_host = PyUnicode_Decode(object->in.dns_host, strlen(object->in.dns_host), "utf-8", "ignore");
	}
	return py_dns_host;
}

static int py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_host");
		return -1;
	}
	object->in.dns_host = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_host);
	if (object->in.dns_host == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.dns_host = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_get_result(PyObject *obj, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsrDeregisterDNSHostRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsrDeregisterDNSHostRecords_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_DsrDeregisterDNSHostRecords_in_get_server_name,
		.set = py_netr_DsrDeregisterDNSHostRecords_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain"),
		.get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain,
		.set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_domain_guid"),
		.get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid,
		.set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "in_dsa_guid"),
		.get = py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid,
		.set = py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid,
		.doc = discard_const_p(char, "PIDL-generated element of base type GUID")
	},
	{
		.name = discard_const_p(char, "in_dns_host"),
		.get = py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host,
		.set = py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsrDeregisterDNSHostRecords_get_result,
		.set = py_netr_DsrDeregisterDNSHostRecords_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsrDeregisterDNSHostRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsrDeregisterDNSHostRecords, type);
	return self;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(41);
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 42) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[41];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 42) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[41];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrDeregisterDNSHostRecords *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 42) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[41];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, args, kwargs, "netr_DsrDeregisterDNSHostRecords_in", NDR_IN);
}

static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, args, kwargs, "netr_DsrDeregisterDNSHostRecords_out", NDR_OUT);
}

static PyMethodDef py_netr_DsrDeregisterDNSHostRecords_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsrDeregisterDNSHostRecords.opnum() -> 41 (0x29) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsrDeregisterDNSHostRecords",
	.tp_getset = py_netr_DsrDeregisterDNSHostRecords_getsetters,
	.tp_methods = py_netr_DsrDeregisterDNSHostRecords_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsrDeregisterDNSHostRecords_new,
};

static bool pack_py_netr_DsrDeregisterDNSHostRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrDeregisterDNSHostRecords *r)
{
	PyObject *py_server_name;
	PyObject *py_domain;
	PyObject *py_domain_guid;
	PyObject *py_dsa_guid;
	PyObject *py_dns_host;
	const char *kwnames[] = {
		"server_name", "domain", "domain_guid", "dsa_guid", "dns_host", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_DsrDeregisterDNSHostRecords", discard_const_p(char *, kwnames), &py_server_name, &py_domain, &py_domain_guid, &py_dsa_guid, &py_dns_host)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_domain == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain");
		return false;
	}
	if (py_domain == Py_None) {
		r->in.domain = NULL;
	} else {
		r->in.domain = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_domain)) {
				unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_domain)) {
				test_str = PyBytes_AS_STRING(py_domain);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.domain = talloc_str;
		}
	}
	if (py_domain_guid == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.domain_guid");
		return false;
	}
	if (py_domain_guid == Py_None) {
		r->in.domain_guid = NULL;
	} else {
		r->in.domain_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
	}
	if (py_dsa_guid == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dsa_guid");
		return false;
	}
	if (py_dsa_guid == Py_None) {
		r->in.dsa_guid = NULL;
	} else {
		r->in.dsa_guid = NULL;
		PY_CHECK_TYPE(GUID_Type, py_dsa_guid, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_dsa_guid)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(py_dsa_guid);
	}
	if (py_dns_host == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_host");
		return false;
	}
	r->in.dns_host = talloc_ptrtype(r, r->in.dns_host);
	if (r->in.dns_host == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_dns_host)) {
			unicode = PyUnicode_AsEncodedString(py_dns_host, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_dns_host)) {
			test_str = PyBytes_AS_STRING(py_dns_host);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_host)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.dns_host = talloc_str;
	}
	return true;
}

static PyObject *unpack_py_netr_DsrDeregisterDNSHostRecords_args_out(struct netr_DsrDeregisterDNSHostRecords *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromWERROR(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_netr_ServerTrustPasswordsGet_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerTrustPasswordsGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerTrustPasswordsGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerTrustPasswordsGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_ServerTrustPasswordsGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_ServerTrustPasswordsGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_out_get_new_owf_password(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_new_owf_password;
	if (object->out.new_owf_password == NULL) {
		Py_RETURN_NONE;
	}
	py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
	return py_new_owf_password;
}

static int py_netr_ServerTrustPasswordsGet_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.new_owf_password");
		return -1;
	}
	object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
	if (object->out.new_owf_password == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_out_get_old_owf_password(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_old_owf_password;
	if (object->out.old_owf_password == NULL) {
		Py_RETURN_NONE;
	}
	py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
	return py_old_owf_password;
}

static int py_netr_ServerTrustPasswordsGet_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.old_owf_password");
		return -1;
	}
	object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
	if (object->out.old_owf_password == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerTrustPasswordsGet_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerTrustPasswordsGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerTrustPasswordsGet_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerTrustPasswordsGet_in_get_server_name,
		.set = py_netr_ServerTrustPasswordsGet_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerTrustPasswordsGet_in_get_account_name,
		.set = py_netr_ServerTrustPasswordsGet_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type,
		.set = py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerTrustPasswordsGet_in_get_computer_name,
		.set = py_netr_ServerTrustPasswordsGet_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_ServerTrustPasswordsGet_in_get_credential,
		.set = py_netr_ServerTrustPasswordsGet_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_ServerTrustPasswordsGet_out_get_return_authenticator,
		.set = py_netr_ServerTrustPasswordsGet_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_new_owf_password"),
		.get = py_netr_ServerTrustPasswordsGet_out_get_new_owf_password,
		.set = py_netr_ServerTrustPasswordsGet_out_set_new_owf_password,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "out_old_owf_password"),
		.get = py_netr_ServerTrustPasswordsGet_out_get_old_owf_password,
		.set = py_netr_ServerTrustPasswordsGet_out_set_old_owf_password,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerTrustPasswordsGet_get_result,
		.set = py_netr_ServerTrustPasswordsGet_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerTrustPasswordsGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerTrustPasswordsGet, type);
	struct netr_ServerTrustPasswordsGet *_self = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
	_self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
	return self;
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(42);
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 43) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[42];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 43) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[42];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerTrustPasswordsGet *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 43) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[42];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, args, kwargs, "netr_ServerTrustPasswordsGet_in", NDR_IN);
}

static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, args, kwargs, "netr_ServerTrustPasswordsGet_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerTrustPasswordsGet_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerTrustPasswordsGet.opnum() -> 42 (0x2a) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerTrustPasswordsGet_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerTrustPasswordsGet",
	.tp_getset = py_netr_ServerTrustPasswordsGet_getsetters,
	.tp_methods = py_netr_ServerTrustPasswordsGet_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerTrustPasswordsGet_new,
};

static bool pack_py_netr_ServerTrustPasswordsGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerTrustPasswordsGet *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credential;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerTrustPasswordsGet", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	return true;
}

static PyObject *unpack_py_netr_ServerTrustPasswordsGet_args_out(struct netr_ServerTrustPasswordsGet *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_new_owf_password = NULL;
	PyObject *py_old_owf_password = NULL;
	PyObject *result = NULL;
	size_t result_size = 3;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
	PyTuple_SetItem(result, 1, py_new_owf_password);

	py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
	PyTuple_SetItem(result, 2, py_old_owf_password);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 3, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_DsRGetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_DsRGetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name(PyObject *obj, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_trusted_domain_name;
	if (object->in.trusted_domain_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.trusted_domain_name == NULL) {
		py_trusted_domain_name = Py_None;
		Py_INCREF(py_trusted_domain_name);
	} else {
		if (object->in.trusted_domain_name == NULL) {
			py_trusted_domain_name = Py_None;
			Py_INCREF(py_trusted_domain_name);
		} else {
			py_trusted_domain_name = PyUnicode_Decode(object->in.trusted_domain_name, strlen(object->in.trusted_domain_name), "utf-8", "ignore");
		}
	}
	return py_trusted_domain_name;
}

static int py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.trusted_domain_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.trusted_domain_name = NULL;
	} else {
		object->in.trusted_domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.trusted_domain_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_netr_DsRGetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_forest_trust_info;
	if (object->out.forest_trust_info == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.forest_trust_info == NULL) {
		py_forest_trust_info = Py_None;
		Py_INCREF(py_forest_trust_info);
	} else {
		py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
	}
	return py_forest_trust_info;
}

static int py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.forest_trust_info");
		return -1;
	}
	object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
	if (object->out.forest_trust_info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.forest_trust_info = NULL;
	} else {
		*object->out.forest_trust_info = NULL;
		PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_DsRGetForestTrustInformation_get_result(PyObject *obj, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromWERROR(object->out.result);
	return py_result;
}

static int py_netr_DsRGetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = W_ERROR(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsRGetForestTrustInformation_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_DsRGetForestTrustInformation_in_get_server_name,
		.set = py_netr_DsRGetForestTrustInformation_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_trusted_domain_name"),
		.get = py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name,
		.set = py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_netr_DsRGetForestTrustInformation_in_get_flags,
		.set = py_netr_DsRGetForestTrustInformation_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_forest_trust_info"),
		.get = py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info,
		.set = py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsRGetForestTrustInformation_get_result,
		.set = py_netr_DsRGetForestTrustInformation_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type WERROR")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsRGetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsRGetForestTrustInformation, type);
	struct netr_DsRGetForestTrustInformation *_self = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	/* a pointer to a NULL pointer */
	_self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
	return self;
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(43);
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 44) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[43];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 44) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[43];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsRGetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 44) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[43];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, args, kwargs, "netr_DsRGetForestTrustInformation_in", NDR_IN);
}

static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, args, kwargs, "netr_DsRGetForestTrustInformation_out", NDR_OUT);
}

static PyMethodDef py_netr_DsRGetForestTrustInformation_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsRGetForestTrustInformation.opnum() -> 43 (0x2b) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsRGetForestTrustInformation_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsRGetForestTrustInformation",
	.tp_getset = py_netr_DsRGetForestTrustInformation_getsetters,
	.tp_methods = py_netr_DsRGetForestTrustInformation_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsRGetForestTrustInformation_new,
};

static bool pack_py_netr_DsRGetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetForestTrustInformation *r)
{
	PyObject *py_server_name;
	PyObject *py_trusted_domain_name;
	PyObject *py_flags;
	const char *kwnames[] = {
		"server_name", "trusted_domain_name", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_DsRGetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_trusted_domain_name, &py_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_trusted_domain_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.trusted_domain_name");
		return false;
	}
	if (py_trusted_domain_name == Py_None) {
		r->in.trusted_domain_name = NULL;
	} else {
		r->in.trusted_domain_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_trusted_domain_name)) {
				unicode = PyUnicode_AsEncodedString(py_trusted_domain_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_trusted_domain_name)) {
				test_str = PyBytes_AS_STRING(py_trusted_domain_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_trusted_domain_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.trusted_domain_name = talloc_str;
		}
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_DsRGetForestTrustInformation_args_out(struct netr_DsRGetForestTrustInformation *r, bool raise_result_exception)
{
	PyObject *py_forest_trust_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 1;

	if (raise_result_exception) {
		if (!W_ERROR_IS_OK(r->out.result)) {
			PyErr_SetWERROR(r->out.result);
			return NULL;
		}

	} else {
		/* WERROR will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (*r->out.forest_trust_info == NULL) {
		py_forest_trust_info = Py_None;
		Py_INCREF(py_forest_trust_info);
	} else {
		py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
	}
	if (result_size > 1) {
		PyTuple_SetItem(result, 0, py_forest_trust_info);
	}
	if (result_size == 1) {
		result = py_forest_trust_info;
	}

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 1, PyErr_FromWERROR(r->out.result));
	}

	return result;
}


static PyObject *py_netr_GetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_GetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_GetForestTrustInformation_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_GetForestTrustInformation_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_GetForestTrustInformation_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_GetForestTrustInformation_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_GetForestTrustInformation_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_GetForestTrustInformation_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_GetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.flags));
	return py_flags;
}

static int py_netr_GetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_GetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_forest_trust_info;
	if (object->out.forest_trust_info == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.forest_trust_info == NULL) {
		py_forest_trust_info = Py_None;
		Py_INCREF(py_forest_trust_info);
	} else {
		py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
	}
	return py_forest_trust_info;
}

static int py_netr_GetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.forest_trust_info");
		return -1;
	}
	object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
	if (object->out.forest_trust_info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.forest_trust_info = NULL;
	} else {
		*object->out.forest_trust_info = NULL;
		PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_GetForestTrustInformation_get_result(PyObject *obj, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_GetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_GetForestTrustInformation_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_GetForestTrustInformation_in_get_server_name,
		.set = py_netr_GetForestTrustInformation_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_GetForestTrustInformation_in_get_computer_name,
		.set = py_netr_GetForestTrustInformation_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_GetForestTrustInformation_in_get_credential,
		.set = py_netr_GetForestTrustInformation_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_GetForestTrustInformation_out_get_return_authenticator,
		.set = py_netr_GetForestTrustInformation_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_netr_GetForestTrustInformation_in_get_flags,
		.set = py_netr_GetForestTrustInformation_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "out_forest_trust_info"),
		.get = py_netr_GetForestTrustInformation_out_get_forest_trust_info,
		.set = py_netr_GetForestTrustInformation_out_set_forest_trust_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_GetForestTrustInformation_get_result,
		.set = py_netr_GetForestTrustInformation_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_GetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_GetForestTrustInformation, type);
	struct netr_GetForestTrustInformation *_self = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	/* a pointer to a NULL pointer */
	_self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
	return self;
}

static PyObject *py_netr_GetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(44);
}

static PyObject *py_netr_GetForestTrustInformation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 45) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[44];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_GetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_GetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_GetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 45) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[44];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_GetForestTrustInformation_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_GetForestTrustInformation *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 45) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[44];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_GetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_GetForestTrustInformation_ndr_print(py_obj, args, kwargs, "netr_GetForestTrustInformation_in", NDR_IN);
}

static PyObject *py_netr_GetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_GetForestTrustInformation_ndr_print(py_obj, args, kwargs, "netr_GetForestTrustInformation_out", NDR_OUT);
}

static PyMethodDef py_netr_GetForestTrustInformation_methods[] = {
	{ "opnum", (PyCFunction)py_netr_GetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_GetForestTrustInformation.opnum() -> 44 (0x2c) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_GetForestTrustInformation_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_GetForestTrustInformation",
	.tp_getset = py_netr_GetForestTrustInformation_getsetters,
	.tp_methods = py_netr_GetForestTrustInformation_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_GetForestTrustInformation_new,
};

static bool pack_py_netr_GetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_GetForestTrustInformation *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_flags;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_GetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_GetForestTrustInformation_args_out(struct netr_GetForestTrustInformation *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_forest_trust_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	if (*r->out.forest_trust_info == NULL) {
		py_forest_trust_info = Py_None;
		Py_INCREF(py_forest_trust_info);
	} else {
		py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
	}
	PyTuple_SetItem(result, 1, py_forest_trust_info);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_LogonSamLogonWithFlags_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_LogonSamLogonWithFlags_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		if (object->in.computer_name == NULL) {
			py_computer_name = Py_None;
			Py_INCREF(py_computer_name);
		} else {
			py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
		}
	}
	return py_computer_name;
}

static int py_netr_LogonSamLogonWithFlags_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.computer_name = NULL;
	} else {
		object->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.computer_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.credential == NULL) {
		py_credential = Py_None;
		Py_INCREF(py_credential);
	} else {
		py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	}
	return py_credential;
}

static int py_netr_LogonSamLogonWithFlags_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	if (value == Py_None) {
		object->in.credential = NULL;
	} else {
		object->in.credential = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_in_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->in.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
	}
	return py_return_authenticator;
}

static int py_netr_LogonSamLogonWithFlags_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.return_authenticator");
		return -1;
	}
	if (value == Py_None) {
		object->in.return_authenticator = NULL;
	} else {
		object->in.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	if (object->out.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	}
	return py_return_authenticator;
}

static int py_netr_LogonSamLogonWithFlags_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	if (value == Py_None) {
		object->out.return_authenticator = NULL;
	} else {
		object->out.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon_level(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_logon_level;
	py_logon_level = PyLong_FromLong((uint16_t)(object->in.logon_level));
	return py_logon_level;
}

static int py_netr_LogonSamLogonWithFlags_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_logon;
	if (object->in.logon == NULL) {
		Py_RETURN_NONE;
	}
	py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
	if (py_logon == NULL) {
		return NULL;
	}
	return py_logon;
}

static int py_netr_LogonSamLogonWithFlags_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.logon");
		return -1;
	}
	object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
	if (object->in.logon == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_LogonLevel *logon_switch_1;
		logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(py_obj), object->in.logon_level, value, "union netr_LogonLevel");
		if (logon_switch_1 == NULL) {
			return -1;
		}
		object->in.logon = logon_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_in_get_validation_level(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_validation_level;
	py_validation_level = PyLong_FromLong((uint16_t)(object->in.validation_level));
	return py_validation_level;
}

static int py_netr_LogonSamLogonWithFlags_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.validation_level");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.validation_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_out_get_validation(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_validation;
	if (object->out.validation == NULL) {
		Py_RETURN_NONE;
	}
	py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
	if (py_validation == NULL) {
		return NULL;
	}
	return py_validation;
}

static int py_netr_LogonSamLogonWithFlags_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.validation");
		return -1;
	}
	object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
	if (object->out.validation == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		union netr_Validation *validation_switch_1;
		validation_switch_1 = (union netr_Validation *)pyrpc_export_union(&netr_Validation_Type, pytalloc_get_mem_ctx(py_obj), object->in.validation_level, value, "union netr_Validation");
		if (validation_switch_1 == NULL) {
			return -1;
		}
		object->out.validation = validation_switch_1;
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_out_get_authoritative(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_authoritative;
	if (object->out.authoritative == NULL) {
		Py_RETURN_NONE;
	}
	py_authoritative = PyLong_FromLong((uint16_t)(*object->out.authoritative));
	return py_authoritative;
}

static int py_netr_LogonSamLogonWithFlags_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.authoritative");
		return -1;
	}
	object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
	if (object->out.authoritative == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.authoritative = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_in_get_flags(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	if (object->in.flags == NULL) {
		Py_RETURN_NONE;
	}
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.flags));
	return py_flags;
}

static int py_netr_LogonSamLogonWithFlags_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.flags");
		return -1;
	}
	object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
	if (object->in.flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_out_get_flags(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_flags;
	if (object->out.flags == NULL) {
		Py_RETURN_NONE;
	}
	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.flags));
	return py_flags;
}

static int py_netr_LogonSamLogonWithFlags_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.flags");
		return -1;
	}
	object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
	if (object->out.flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_LogonSamLogonWithFlags_get_result(PyObject *obj, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_LogonSamLogonWithFlags_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_LogonSamLogonWithFlags_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_server_name,
		.set = py_netr_LogonSamLogonWithFlags_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_computer_name,
		.set = py_netr_LogonSamLogonWithFlags_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_credential,
		.set = py_netr_LogonSamLogonWithFlags_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_return_authenticator"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_return_authenticator,
		.set = py_netr_LogonSamLogonWithFlags_in_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_LogonSamLogonWithFlags_out_get_return_authenticator,
		.set = py_netr_LogonSamLogonWithFlags_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_logon_level"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_logon_level,
		.set = py_netr_LogonSamLogonWithFlags_in_set_logon_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
	},
	{
		.name = discard_const_p(char, "in_logon"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_logon,
		.set = py_netr_LogonSamLogonWithFlags_in_set_logon,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
	},
	{
		.name = discard_const_p(char, "in_validation_level"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_validation_level,
		.set = py_netr_LogonSamLogonWithFlags_in_set_validation_level,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "out_validation"),
		.get = py_netr_LogonSamLogonWithFlags_out_get_validation,
		.set = py_netr_LogonSamLogonWithFlags_out_set_validation,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
	},
	{
		.name = discard_const_p(char, "out_authoritative"),
		.get = py_netr_LogonSamLogonWithFlags_out_get_authoritative,
		.set = py_netr_LogonSamLogonWithFlags_out_set_authoritative,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint8")
	},
	{
		.name = discard_const_p(char, "in_flags"),
		.get = py_netr_LogonSamLogonWithFlags_in_get_flags,
		.set = py_netr_LogonSamLogonWithFlags_in_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
	},
	{
		.name = discard_const_p(char, "out_flags"),
		.get = py_netr_LogonSamLogonWithFlags_out_get_flags,
		.set = py_netr_LogonSamLogonWithFlags_out_set_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_LogonSamLogonWithFlags_get_result,
		.set = py_netr_LogonSamLogonWithFlags_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_LogonSamLogonWithFlags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_LogonSamLogonWithFlags, type);
	struct netr_LogonSamLogonWithFlags *_self = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
	_self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
	_self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
	_self->in.flags = talloc_zero(mem_ctx, uint32_t);
	_self->out.flags = talloc_zero(mem_ctx, uint32_t);
	return self;
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(45);
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 46) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[45];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 46) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[45];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_LogonSamLogonWithFlags *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 46) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[45];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogonWithFlags_in", NDR_IN);
}

static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, args, kwargs, "netr_LogonSamLogonWithFlags_out", NDR_OUT);
}

static PyMethodDef py_netr_LogonSamLogonWithFlags_methods[] = {
	{ "opnum", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_LogonSamLogonWithFlags.opnum() -> 45 (0x2d) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_LogonSamLogonWithFlags_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_LogonSamLogonWithFlags",
	.tp_getset = py_netr_LogonSamLogonWithFlags_getsetters,
	.tp_methods = py_netr_LogonSamLogonWithFlags_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_LogonSamLogonWithFlags_new,
};

static bool pack_py_netr_LogonSamLogonWithFlags_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonWithFlags *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_return_authenticator;
	PyObject *py_logon_level;
	PyObject *py_logon;
	PyObject *py_validation_level;
	PyObject *py_flags;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", "flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:netr_LogonSamLogonWithFlags", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_return_authenticator, &py_logon_level, &py_logon, &py_validation_level, &py_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	if (py_computer_name == Py_None) {
		r->in.computer_name = NULL;
	} else {
		r->in.computer_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_computer_name)) {
				unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_computer_name)) {
				test_str = PyBytes_AS_STRING(py_computer_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.computer_name = talloc_str;
		}
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	if (py_credential == Py_None) {
		r->in.credential = NULL;
	} else {
		r->in.credential = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	}
	if (py_return_authenticator == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.return_authenticator");
		return false;
	}
	if (py_return_authenticator == Py_None) {
		r->in.return_authenticator = NULL;
	} else {
		r->in.return_authenticator = NULL;
		PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
		if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
	}
	if (py_logon_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
		if (PyLong_Check(py_logon_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_logon_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.logon_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_logon == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.logon");
		return false;
	}
	r->in.logon = talloc_ptrtype(r, r->in.logon);
	if (r->in.logon == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		union netr_LogonLevel *logon_switch_1;
		logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
		if (logon_switch_1 == NULL) {
			return false;
		}
		r->in.logon = logon_switch_1;
	}
	if (py_validation_level == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.validation_level");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
		if (PyLong_Check(py_validation_level)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_validation_level);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.validation_level = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.flags");
		return false;
	}
	r->in.flags = talloc_ptrtype(r, r->in.flags);
	if (r->in.flags == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
		if (PyLong_Check(py_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_LogonSamLogonWithFlags_args_out(struct netr_LogonSamLogonWithFlags *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_validation = NULL;
	PyObject *py_authoritative = NULL;
	PyObject *py_flags = NULL;
	PyObject *result = NULL;
	size_t result_size = 4;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	if (r->out.return_authenticator == NULL) {
		py_return_authenticator = Py_None;
		Py_INCREF(py_return_authenticator);
	} else {
		py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	}
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
	if (py_validation == NULL) {
		return NULL;
	}
	PyTuple_SetItem(result, 1, py_validation);

	py_authoritative = PyLong_FromLong((uint16_t)(*r->out.authoritative));
	PyTuple_SetItem(result, 2, py_authoritative);

	py_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.flags));
	PyTuple_SetItem(result, 3, py_flags);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 4, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerGetTrustInfo_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerGetTrustInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerGetTrustInfo_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_in_get_secure_channel_type(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_secure_channel_type;
	py_secure_channel_type = PyLong_FromLong((uint16_t)(object->in.secure_channel_type));
	return py_secure_channel_type;
}

static int py_netr_ServerGetTrustInfo_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.secure_channel_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerGetTrustInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_ServerGetTrustInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_ServerGetTrustInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_out_get_new_owf_password(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_new_owf_password;
	if (object->out.new_owf_password == NULL) {
		Py_RETURN_NONE;
	}
	py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
	return py_new_owf_password;
}

static int py_netr_ServerGetTrustInfo_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.new_owf_password");
		return -1;
	}
	object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
	if (object->out.new_owf_password == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_out_get_old_owf_password(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_old_owf_password;
	if (object->out.old_owf_password == NULL) {
		Py_RETURN_NONE;
	}
	py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
	return py_old_owf_password;
}

static int py_netr_ServerGetTrustInfo_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.old_owf_password");
		return -1;
	}
	object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
	if (object->out.old_owf_password == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_out_get_trust_info(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_trust_info;
	if (object->out.trust_info == NULL) {
		Py_RETURN_NONE;
	}
	if (*object->out.trust_info == NULL) {
		py_trust_info = Py_None;
		Py_INCREF(py_trust_info);
	} else {
		py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *object->out.trust_info, *object->out.trust_info);
	}
	return py_trust_info;
}

static int py_netr_ServerGetTrustInfo_out_set_trust_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trust_info));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.trust_info");
		return -1;
	}
	object->out.trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trust_info);
	if (object->out.trust_info == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	if (value == Py_None) {
		*object->out.trust_info = NULL;
	} else {
		*object->out.trust_info = NULL;
		PY_CHECK_TYPE(&netr_TrustInfo_Type, value, return -1;);
		if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		*object->out.trust_info = (struct netr_TrustInfo *)pytalloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_netr_ServerGetTrustInfo_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerGetTrustInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerGetTrustInfo_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerGetTrustInfo_in_get_server_name,
		.set = py_netr_ServerGetTrustInfo_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerGetTrustInfo_in_get_account_name,
		.set = py_netr_ServerGetTrustInfo_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_secure_channel_type"),
		.get = py_netr_ServerGetTrustInfo_in_get_secure_channel_type,
		.set = py_netr_ServerGetTrustInfo_in_set_secure_channel_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerGetTrustInfo_in_get_computer_name,
		.set = py_netr_ServerGetTrustInfo_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_ServerGetTrustInfo_in_get_credential,
		.set = py_netr_ServerGetTrustInfo_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_ServerGetTrustInfo_out_get_return_authenticator,
		.set = py_netr_ServerGetTrustInfo_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_new_owf_password"),
		.get = py_netr_ServerGetTrustInfo_out_get_new_owf_password,
		.set = py_netr_ServerGetTrustInfo_out_set_new_owf_password,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "out_old_owf_password"),
		.get = py_netr_ServerGetTrustInfo_out_get_old_owf_password,
		.set = py_netr_ServerGetTrustInfo_out_set_old_owf_password,
		.doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
	},
	{
		.name = discard_const_p(char, "out_trust_info"),
		.get = py_netr_ServerGetTrustInfo_out_get_trust_info,
		.set = py_netr_ServerGetTrustInfo_out_set_trust_info,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustInfo")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerGetTrustInfo_get_result,
		.set = py_netr_ServerGetTrustInfo_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerGetTrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerGetTrustInfo, type);
	struct netr_ServerGetTrustInfo *_self = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
	_self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
	/* a pointer to a NULL pointer */
	_self->out.trust_info = talloc_zero(mem_ctx, struct netr_TrustInfo *);
	return self;
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(46);
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 47) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[46];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 47) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[46];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerGetTrustInfo *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 47) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[46];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerGetTrustInfo_ndr_print(py_obj, args, kwargs, "netr_ServerGetTrustInfo_in", NDR_IN);
}

static PyObject *py_netr_ServerGetTrustInfo_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerGetTrustInfo_ndr_print(py_obj, args, kwargs, "netr_ServerGetTrustInfo_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerGetTrustInfo_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerGetTrustInfo.opnum() -> 46 (0x2e) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerGetTrustInfo_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerGetTrustInfo",
	.tp_getset = py_netr_ServerGetTrustInfo_getsetters,
	.tp_methods = py_netr_ServerGetTrustInfo_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerGetTrustInfo_new,
};

static bool pack_py_netr_ServerGetTrustInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerGetTrustInfo *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_secure_channel_type;
	PyObject *py_computer_name;
	PyObject *py_credential;
	const char *kwnames[] = {
		"server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerGetTrustInfo", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_secure_channel_type, &py_computer_name, &py_credential)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_secure_channel_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.secure_channel_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
		if (PyLong_Check(py_secure_channel_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.secure_channel_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	return true;
}

static PyObject *unpack_py_netr_ServerGetTrustInfo_args_out(struct netr_ServerGetTrustInfo *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_new_owf_password = NULL;
	PyObject *py_old_owf_password = NULL;
	PyObject *py_trust_info = NULL;
	PyObject *result = NULL;
	size_t result_size = 4;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
	PyTuple_SetItem(result, 1, py_new_owf_password);

	py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
	PyTuple_SetItem(result, 2, py_old_owf_password);

	if (*r->out.trust_info == NULL) {
		py_trust_info = Py_None;
		Py_INCREF(py_trust_info);
	} else {
		py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *r->out.trust_info, *r->out.trust_info);
	}
	PyTuple_SetItem(result, 3, py_trust_info);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 4, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_Unused47_get_result(PyObject *obj, void *closure)
{
	struct netr_Unused47 *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_Unused47_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_Unused47_getsetters[] = {
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_Unused47_get_result,
		.set = py_netr_Unused47_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_Unused47_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_Unused47, type);
	return self;
}

static PyObject *py_netr_Unused47_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(47);
}

static PyObject *py_netr_Unused47_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 48) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[47];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_Unused47_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_Unused47_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_Unused47_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_Unused47_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_Unused47_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 48) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[47];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_Unused47_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_Unused47_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_Unused47_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_Unused47 *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 48) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[47];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_Unused47_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_Unused47_ndr_print(py_obj, args, kwargs, "netr_Unused47_in", NDR_IN);
}

static PyObject *py_netr_Unused47_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_Unused47_ndr_print(py_obj, args, kwargs, "netr_Unused47_out", NDR_OUT);
}

static PyMethodDef py_netr_Unused47_methods[] = {
	{ "opnum", (PyCFunction)py_netr_Unused47_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_Unused47.opnum() -> 47 (0x2f) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_Unused47_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_Unused47",
	.tp_getset = py_netr_Unused47_getsetters,
	.tp_methods = py_netr_Unused47_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_Unused47_new,
};

static bool pack_py_netr_Unused47_args_in(PyObject *args, PyObject *kwargs, struct netr_Unused47 *r)
{
	const char *kwnames[] = {
		NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":netr_Unused47", discard_const_p(char *, kwnames))) {
		return false;
	}

	return true;
}

static PyObject *unpack_py_netr_Unused47_args_out(struct netr_Unused47 *r, bool raise_result_exception)
{
	PyObject *result = NULL;
	size_t result_size = 0;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (!raise_result_exception) {
		result = PyErr_FromNTSTATUS(r->out.result);
	}

	if (result_size == 0) {
		result = Py_None;
		Py_INCREF(result);
	}

	return result;
}


static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_credential;
	if (object->in.credential == NULL) {
		Py_RETURN_NONE;
	}
	py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
	return py_credential;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.credential");
		return -1;
	}
	object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
	if (object->in.credential == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_return_authenticator;
	if (object->out.return_authenticator == NULL) {
		Py_RETURN_NONE;
	}
	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
	return py_return_authenticator;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.return_authenticator");
		return -1;
	}
	object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
	if (object->out.return_authenticator == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_site_name;
	if (object->in.site_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.site_name == NULL) {
		py_site_name = Py_None;
		Py_INCREF(py_site_name);
	} else {
		if (object->in.site_name == NULL) {
			py_site_name = Py_None;
			Py_INCREF(py_site_name);
		} else {
			py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
		}
	}
	return py_site_name;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.site_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.site_name = NULL;
	} else {
		object->in.site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.site_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_ttl;
	py_dns_ttl = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dns_ttl));
	return py_dns_ttl;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_ttl");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dns_ttl));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.dns_ttl = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_names;
	if (object->in.dns_names == NULL) {
		Py_RETURN_NONE;
	}
	py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->in.dns_names, object->in.dns_names);
	return py_dns_names;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dns_names));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dns_names");
		return -1;
	}
	object->in.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_names);
	if (object->in.dns_names == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_dns_names;
	if (object->out.dns_names == NULL) {
		Py_RETURN_NONE;
	}
	py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->out.dns_names, object->out.dns_names);
	return py_dns_names;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dns_names));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.dns_names");
		return -1;
	}
	object->out.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dns_names);
	if (object->out.dns_names == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
	if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	object->out.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
	return 0;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result(PyObject *obj, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_credential"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "out_return_authenticator"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
	},
	{
		.name = discard_const_p(char, "in_site_name"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_dns_ttl"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "in_dns_names"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names,
		.doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
	},
	{
		.name = discard_const_p(char, "out_dns_names"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names,
		.doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result,
		.set = py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_DsrUpdateReadOnlyServerDnsRecords, type);
	struct netr_DsrUpdateReadOnlyServerDnsRecords *_self = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
	_self->in.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
	_self->out.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
	return self;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(48);
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 49) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[48];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 49) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[48];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_DsrUpdateReadOnlyServerDnsRecords *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 49) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[48];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, args, kwargs, "netr_DsrUpdateReadOnlyServerDnsRecords_in", NDR_IN);
}

static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, args, kwargs, "netr_DsrUpdateReadOnlyServerDnsRecords_out", NDR_OUT);
}

static PyMethodDef py_netr_DsrUpdateReadOnlyServerDnsRecords_methods[] = {
	{ "opnum", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_DsrUpdateReadOnlyServerDnsRecords.opnum() -> 48 (0x30) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_DsrUpdateReadOnlyServerDnsRecords",
	.tp_getset = py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters,
	.tp_methods = py_netr_DsrUpdateReadOnlyServerDnsRecords_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_DsrUpdateReadOnlyServerDnsRecords_new,
};

static bool pack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
{
	PyObject *py_server_name;
	PyObject *py_computer_name;
	PyObject *py_credential;
	PyObject *py_site_name;
	PyObject *py_dns_ttl;
	PyObject *py_dns_names;
	const char *kwnames[] = {
		"server_name", "computer_name", "credential", "site_name", "dns_ttl", "dns_names", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:netr_DsrUpdateReadOnlyServerDnsRecords", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_site_name, &py_dns_ttl, &py_dns_names)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_credential == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.credential");
		return false;
	}
	r->in.credential = talloc_ptrtype(r, r->in.credential);
	if (r->in.credential == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
	if (py_site_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.site_name");
		return false;
	}
	if (py_site_name == Py_None) {
		r->in.site_name = NULL;
	} else {
		r->in.site_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_site_name)) {
				unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_site_name)) {
				test_str = PyBytes_AS_STRING(py_site_name);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
				return false;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.site_name = talloc_str;
		}
	}
	if (py_dns_ttl == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_ttl");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dns_ttl));
		if (PyLong_Check(py_dns_ttl)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_dns_ttl);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.dns_ttl = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_dns_names == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dns_names");
		return false;
	}
	r->in.dns_names = talloc_ptrtype(r, r->in.dns_names);
	if (r->in.dns_names == NULL) {
		PyErr_NoMemory();
		return false;
	}
	PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, py_dns_names, return false;);
	if (talloc_reference(r, pytalloc_get_mem_ctx(py_dns_names)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_dns_names);
	return true;
}

static PyObject *unpack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_out(struct netr_DsrUpdateReadOnlyServerDnsRecords *r, bool raise_result_exception)
{
	PyObject *py_return_authenticator = NULL;
	PyObject *py_dns_names = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
	PyTuple_SetItem(result, 0, py_return_authenticator);

	py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, r->out.dns_names, r->out.dns_names);
	PyTuple_SetItem(result, 1, py_dns_names);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}


static PyObject *py_netr_ServerAuthenticateKerberos_in_get_server_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_server_name;
	if (object->in.server_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.server_name == NULL) {
		py_server_name = Py_None;
		Py_INCREF(py_server_name);
	} else {
		if (object->in.server_name == NULL) {
			py_server_name = Py_None;
			Py_INCREF(py_server_name);
		} else {
			py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
		}
	}
	return py_server_name;
}

static int py_netr_ServerAuthenticateKerberos_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.server_name");
		return -1;
	}
	if (value == Py_None) {
		object->in.server_name = NULL;
	} else {
		object->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(value)) {
				unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
				if (unicode == NULL) {
					return -1;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(value)) {
				test_str = PyBytes_AS_STRING(value);
			} else {
				PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
				return -1;
			}
			talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->in.server_name = talloc_str;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticateKerberos_in_get_account_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_account_name;
	if (object->in.account_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.account_name == NULL) {
		py_account_name = Py_None;
		Py_INCREF(py_account_name);
	} else {
		py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
	}
	return py_account_name;
}

static int py_netr_ServerAuthenticateKerberos_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_name");
		return -1;
	}
	object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
	if (object->in.account_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.account_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticateKerberos_in_get_account_type(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_account_type;
	py_account_type = PyLong_FromLong((uint16_t)(object->in.account_type));
	return py_account_type;
}

static int py_netr_ServerAuthenticateKerberos_in_set_account_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.account_type");
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.account_type));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			object->in.account_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticateKerberos_in_get_computer_name(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_computer_name;
	if (object->in.computer_name == NULL) {
		Py_RETURN_NONE;
	}
	if (object->in.computer_name == NULL) {
		py_computer_name = Py_None;
		Py_INCREF(py_computer_name);
	} else {
		py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
	}
	return py_computer_name;
}

static int py_netr_ServerAuthenticateKerberos_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.computer_name");
		return -1;
	}
	object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
	if (object->in.computer_name == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(value)) {
			unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
			if (unicode == NULL) {
				return -1;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(value)) {
			test_str = PyBytes_AS_STRING(value);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
			return -1;
		}
		talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->in.computer_name = talloc_str;
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticateKerberos_in_get_negotiate_flags(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_negotiate_flags;
	if (object->in.negotiate_flags == NULL) {
		Py_RETURN_NONE;
	}
	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->in.negotiate_flags));
	return py_negotiate_flags;
}

static int py_netr_ServerAuthenticateKerberos_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.negotiate_flags");
		return -1;
	}
	object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
	if (object->in.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->in.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticateKerberos_out_get_negotiate_flags(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_negotiate_flags;
	if (object->out.negotiate_flags == NULL) {
		Py_RETURN_NONE;
	}
	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.negotiate_flags));
	return py_negotiate_flags;
}

static int py_netr_ServerAuthenticateKerberos_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.negotiate_flags");
		return -1;
	}
	object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
	if (object->out.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticateKerberos_out_get_rid(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_rid;
	if (object->out.rid == NULL) {
		Py_RETURN_NONE;
	}
	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.rid));
	return py_rid;
}

static int py_netr_ServerAuthenticateKerberos_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.rid");
		return -1;
	}
	object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
	if (object->out.rid == NULL) {
		PyErr_NoMemory();
		return -1;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
		if (PyLong_Check(value)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(value);
			if (PyErr_Occurred() != NULL) {
				return -1;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return -1;
			}
			*object->out.rid = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return -1;
		}
	}
	return 0;
}

static PyObject *py_netr_ServerAuthenticateKerberos_get_result(PyObject *obj, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(obj);
	PyObject *py_result;
	py_result = PyErr_FromNTSTATUS(object->out.result);
	return py_result;
}

static int py_netr_ServerAuthenticateKerberos_set_result(PyObject *py_obj, PyObject *value, void *closure)
{
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	if (value == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
		return -1;
	}
	object->out.result = NT_STATUS(PyLong_AsLong(value));
	return 0;
}

static PyGetSetDef py_netr_ServerAuthenticateKerberos_getsetters[] = {
	{
		.name = discard_const_p(char, "in_server_name"),
		.get = py_netr_ServerAuthenticateKerberos_in_get_server_name,
		.set = py_netr_ServerAuthenticateKerberos_in_set_server_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_name"),
		.get = py_netr_ServerAuthenticateKerberos_in_get_account_name,
		.set = py_netr_ServerAuthenticateKerberos_in_set_account_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_account_type"),
		.get = py_netr_ServerAuthenticateKerberos_in_get_account_type,
		.set = py_netr_ServerAuthenticateKerberos_in_set_account_type,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
	},
	{
		.name = discard_const_p(char, "in_computer_name"),
		.get = py_netr_ServerAuthenticateKerberos_in_get_computer_name,
		.set = py_netr_ServerAuthenticateKerberos_in_set_computer_name,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint16")
	},
	{
		.name = discard_const_p(char, "in_negotiate_flags"),
		.get = py_netr_ServerAuthenticateKerberos_in_get_negotiate_flags,
		.set = py_netr_ServerAuthenticateKerberos_in_set_negotiate_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
	},
	{
		.name = discard_const_p(char, "out_negotiate_flags"),
		.get = py_netr_ServerAuthenticateKerberos_out_get_negotiate_flags,
		.set = py_netr_ServerAuthenticateKerberos_out_set_negotiate_flags,
		.doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
	},
	{
		.name = discard_const_p(char, "out_rid"),
		.get = py_netr_ServerAuthenticateKerberos_out_get_rid,
		.set = py_netr_ServerAuthenticateKerberos_out_set_rid,
		.doc = discard_const_p(char, "PIDL-generated element of base type uint32")
	},
	{
		.name = discard_const_p(char, "result"),
		.get = py_netr_ServerAuthenticateKerberos_get_result,
		.set = py_netr_ServerAuthenticateKerberos_set_result,
		.doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
	},
	{ .name = NULL }
};

static PyObject *py_netr_ServerAuthenticateKerberos_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	PyObject *self = pytalloc_new(struct netr_ServerAuthenticateKerberos, type);
	struct netr_ServerAuthenticateKerberos *_self = (struct netr_ServerAuthenticateKerberos *)pytalloc_get_ptr(self);
	TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
	_self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
	_self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
	_self->out.rid = talloc_zero(mem_ctx, uint32_t);
	return self;
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
{


	return PyLong_FromLong(59);
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	PyObject *ret = NULL;
	struct ndr_push *push = NULL;
	DATA_BLOB blob;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 60) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticateKerberos_ndr_pack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[59];

	push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
	if (push == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	push->flags |= ndr_push_flags;

	err = call->ndr_push(push, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(push);
		PyErr_SetNdrError(err);
		return NULL;
	}
	blob = ndr_push_blob(push);
	ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
	TALLOC_FREE(push);
	return ret;
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticateKerberos_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	const char * const kwnames[] = { "bigendian", "ndr64", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_push_flags = 0;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
		discard_const_p(char *, kwnames),
		&bigendian_obj,
		&ndr64_obj)) {
		return NULL;
	}

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_push_flags |= LIBNDR_FLAG_NDR64;
	}

	return py_netr_ServerAuthenticateKerberos_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	struct ndr_pull *pull = NULL;
	enum ndr_err_code err;

	if (ndr_table_netlogon.num_calls < 60) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticateKerberos_ndr_unpack");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[59];

	pull = ndr_pull_init_blob(blob, object);
	if (pull == NULL) {
		PyErr_SetNdrError(NDR_ERR_ALLOC);
		return NULL;
	}

	pull->flags |= ndr_pull_flags;

	err = call->ndr_pull(pull, ndr_inout_flags, object);
	if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
		TALLOC_FREE(pull);
		PyErr_SetNdrError(err);
		return NULL;
	}
	if (!allow_remaining) {
		uint32_t highest_ofs;

		if (pull->offset > pull->relative_highest_offset) {
			highest_ofs = pull->offset;
		} else {
			highest_ofs = pull->relative_highest_offset;
		}
		if (highest_ofs < pull->data_size) {
			err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
				"not all bytes consumed ofs[%u] size[%u]",
				highest_ofs, pull->data_size);
			TALLOC_FREE(pull);
			PyErr_SetNdrError(err);
			return NULL;
		}
	}

	TALLOC_FREE(pull);
	Py_RETURN_NONE;
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticateKerberos_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	DATA_BLOB blob;
	Py_ssize_t blob_length = 0;
	const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
	PyObject *bigendian_obj = NULL;
	PyObject *ndr64_obj = NULL;
	libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
	PyObject *allow_remaining_obj = NULL;
	bool allow_remaining = false;

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
		discard_const_p(char *, kwnames),
		&blob.data, &blob_length,
		&bigendian_obj,
		&ndr64_obj,
		&allow_remaining_obj)) {
		return NULL;
	}
	blob.length = blob_length;

	if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
	}
	if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
		ndr_pull_flags |= LIBNDR_FLAG_NDR64;
	}

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

	return py_netr_ServerAuthenticateKerberos_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_print(PyObject *py_obj, PyObject *args, PyObject *kwargs, const char *name, ndr_flags_type ndr_inout_flags)
{
	const struct ndr_interface_call *call = NULL;
	struct netr_ServerAuthenticateKerberos *object = pytalloc_get_ptr(py_obj);
	const char * const kwnames[] = { "print_secrets", NULL };
	PyObject *py_print_secrets = NULL;
	PyObject *ret;
	char *retstr;
	bool ok;

	ok = PyArg_ParseTupleAndKeywords(args, kwargs, "|O:__ndr_print__",
		discard_const_p(char *, kwnames),
		&py_print_secrets);
	if (!ok) {
		return NULL;
	}

	if (ndr_table_netlogon.num_calls < 60) {
		PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticateKerberos_ndr_print");
		return NULL;
	}
	call = &ndr_table_netlogon.calls[59];

	if (py_print_secrets != NULL && PyObject_IsTrue(py_print_secrets)) {
		retstr = ndr_print_function_secret_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	} else {
		retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
	}
	ret = PyUnicode_FromString(retstr);
	TALLOC_FREE(retstr);

	return ret;
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_print_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticateKerberos_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticateKerberos_in", NDR_IN);
}

static PyObject *py_netr_ServerAuthenticateKerberos_ndr_print_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
{
	return py_netr_ServerAuthenticateKerberos_ndr_print(py_obj, args, kwargs, "netr_ServerAuthenticateKerberos_out", NDR_OUT);
}

static PyMethodDef py_netr_ServerAuthenticateKerberos_methods[] = {
	{ "opnum", (PyCFunction)py_netr_ServerAuthenticateKerberos_ndr_opnum, METH_NOARGS|METH_CLASS,
		"netlogon.netr_ServerAuthenticateKerberos.opnum() -> 59 (0x3b) " },
	{ "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticateKerberos_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
	{ "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticateKerberos_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
	{ "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticateKerberos_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
	{ "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticateKerberos_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
	{ "__ndr_print_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticateKerberos_ndr_print_in), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_in(object, print_secrets=False) -> String\nNDR print input" },
	{ "__ndr_print_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticateKerberos_ndr_print_out), METH_VARARGS|METH_KEYWORDS,
		"S.ndr_print_out(object, print_secrets=False) -> String\nNDR print output" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject netr_ServerAuthenticateKerberos_Type = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netr_ServerAuthenticateKerberos",
	.tp_getset = py_netr_ServerAuthenticateKerberos_getsetters,
	.tp_methods = py_netr_ServerAuthenticateKerberos_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = py_netr_ServerAuthenticateKerberos_new,
};

static bool pack_py_netr_ServerAuthenticateKerberos_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticateKerberos *r)
{
	PyObject *py_server_name;
	PyObject *py_account_name;
	PyObject *py_account_type;
	PyObject *py_computer_name;
	PyObject *py_negotiate_flags;
	const char *kwnames[] = {
		"server_name", "account_name", "account_type", "computer_name", "negotiate_flags", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:netr_ServerAuthenticateKerberos", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_account_type, &py_computer_name, &py_negotiate_flags)) {
		return false;
	}

	if (py_server_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.server_name");
		return false;
	}
	if (py_server_name == Py_None) {
		r->in.server_name = NULL;
	} else {
		r->in.server_name = NULL;
		{
			const char *test_str;
			const char *talloc_str;
			PyObject *unicode = NULL;
			if (PyUnicode_Check(py_server_name)) {
				unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
				if (unicode == NULL) {
					return false;
				}
				test_str = PyBytes_AS_STRING(unicode);
			} else if (PyBytes_Check(py_server_name)) {
				test_str = PyBytes_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;
			}
			talloc_str = talloc_strdup(r, test_str);
			if (unicode != NULL) {
				Py_DECREF(unicode);
			}
			if (talloc_str == NULL) {
				PyErr_NoMemory();
				return false;
			}
			r->in.server_name = talloc_str;
		}
	}
	if (py_account_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_name");
		return false;
	}
	r->in.account_name = talloc_ptrtype(r, r->in.account_name);
	if (r->in.account_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_account_name)) {
			unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_account_name)) {
			test_str = PyBytes_AS_STRING(py_account_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.account_name = talloc_str;
	}
	if (py_account_type == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.account_type");
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.account_type));
		if (PyLong_Check(py_account_type)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_account_type);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			r->in.account_type = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	if (py_computer_name == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.computer_name");
		return false;
	}
	r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
	if (r->in.computer_name == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const char *test_str;
		const char *talloc_str;
		PyObject *unicode = NULL;
		if (PyUnicode_Check(py_computer_name)) {
			unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
			if (unicode == NULL) {
				return false;
			}
			test_str = PyBytes_AS_STRING(unicode);
		} else if (PyBytes_Check(py_computer_name)) {
			test_str = PyBytes_AS_STRING(py_computer_name);
		} else {
			PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
			return false;
		}
		talloc_str = talloc_strdup(r, test_str);
		if (unicode != NULL) {
			Py_DECREF(unicode);
		}
		if (talloc_str == NULL) {
			PyErr_NoMemory();
			return false;
		}
		r->in.computer_name = talloc_str;
	}
	if (py_negotiate_flags == NULL) {
		PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.negotiate_flags");
		return false;
	}
	r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
	if (r->in.negotiate_flags == NULL) {
		PyErr_NoMemory();
		return false;
	}
	{
		const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
		if (PyLong_Check(py_negotiate_flags)) {
			unsigned long long test_var;
			test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
			if (PyErr_Occurred() != NULL) {
				return false;
			}
			if (test_var > uint_max) {
				PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
				  PyLong_Type.tp_name, uint_max, test_var);
				return false;
			}
			*r->in.negotiate_flags = test_var;
		} else {
			PyErr_Format(PyExc_TypeError, "Expected type %s",
			  PyLong_Type.tp_name);
			return false;
		}
	}
	return true;
}

static PyObject *unpack_py_netr_ServerAuthenticateKerberos_args_out(struct netr_ServerAuthenticateKerberos *r, bool raise_result_exception)
{
	PyObject *py_negotiate_flags = NULL;
	PyObject *py_rid = NULL;
	PyObject *result = NULL;
	size_t result_size = 2;

	if (raise_result_exception) {
		if (NT_STATUS_IS_ERR(r->out.result)) {
			PyErr_SetNTSTATUS(r->out.result);
			return NULL;
		}

	} else {
		/* NTSTATUS will be part of the results */
		result_size += 1;
	}

	if (result_size > 1) {
		result = PyTuple_New(result_size);
		if (result == NULL) {
			return NULL;
		}
	}

	py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.negotiate_flags));
	PyTuple_SetItem(result, 0, py_negotiate_flags);

	py_rid = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.rid));
	PyTuple_SetItem(result, 1, py_rid);

	if (!raise_result_exception) {
		PyTuple_SetItem(result, 2, PyErr_FromNTSTATUS(r->out.result));
	}

	return result;
}

const struct PyNdrRpcMethodDef py_ndr_netlogon_methods[] = {
	{
		.name = "netr_LogonUasLogon",
		.doc = "S.netr_LogonUasLogon(server_name, account_name, workstation) -> info",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonUasLogon_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonUasLogon_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonUasLogon_args_out,
		.opnum = 0,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonUasLogoff",
		.doc = "S.netr_LogonUasLogoff(server_name, account_name, workstation) -> info",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonUasLogoff_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonUasLogoff_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonUasLogoff_args_out,
		.opnum = 1,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonSamLogon",
		.doc = "S.netr_LogonSamLogon(server_name, computer_name, credential, return_authenticator, logon_level, logon, validation_level) -> (return_authenticator, validation, authoritative)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogon_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonSamLogon_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonSamLogon_args_out,
		.opnum = 2,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonSamLogoff",
		.doc = "S.netr_LogonSamLogoff(server_name, computer_name, credential, return_authenticator, logon_level, logon) -> return_authenticator",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogoff_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonSamLogoff_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonSamLogoff_args_out,
		.opnum = 3,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerReqChallenge",
		.doc = "S.netr_ServerReqChallenge(server_name, computer_name, credentials) -> return_credentials",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerReqChallenge_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerReqChallenge_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerReqChallenge_args_out,
		.opnum = 4,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerAuthenticate",
		.doc = "S.netr_ServerAuthenticate(server_name, account_name, secure_channel_type, computer_name, credentials) -> return_credentials",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerAuthenticate_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerAuthenticate_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerAuthenticate_args_out,
		.opnum = 5,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerPasswordSet",
		.doc = "S.netr_ServerPasswordSet(server_name, account_name, secure_channel_type, computer_name, credential, new_password) -> return_authenticator",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerPasswordSet_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerPasswordSet_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerPasswordSet_args_out,
		.opnum = 6,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DatabaseDeltas",
		.doc = "S.netr_DatabaseDeltas(logon_server, computername, credential, return_authenticator, database_id, sequence_num, preferredmaximumlength) -> (return_authenticator, sequence_num, delta_enum_array)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DatabaseDeltas_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DatabaseDeltas_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DatabaseDeltas_args_out,
		.opnum = 7,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DatabaseSync",
		.doc = "S.netr_DatabaseSync(logon_server, computername, credential, return_authenticator, database_id, sync_context, preferredmaximumlength) -> (return_authenticator, sync_context, delta_enum_array)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DatabaseSync_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DatabaseSync_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DatabaseSync_args_out,
		.opnum = 8,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_AccountDeltas",
		.doc = "S.netr_AccountDeltas(logon_server, computername, credential, return_authenticator, uas, count, level, buffersize) -> (return_authenticator, buffer, count_returned, total_entries, recordid)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_AccountDeltas_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_AccountDeltas_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_AccountDeltas_args_out,
		.opnum = 9,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_AccountSync",
		.doc = "S.netr_AccountSync(logon_server, computername, credential, return_authenticator, reference, level, buffersize, recordid) -> (return_authenticator, buffer, count_returned, total_entries, next_reference, recordid)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_AccountSync_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_AccountSync_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_AccountSync_args_out,
		.opnum = 10,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_GetDcName",
		.doc = "S.netr_GetDcName(logon_server, domainname) -> dcname",
		.call = (py_dcerpc_call_fn)dcerpc_netr_GetDcName_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_GetDcName_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_GetDcName_args_out,
		.opnum = 11,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonControl",
		.doc = "S.netr_LogonControl(logon_server, function_code, level) -> query",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonControl_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonControl_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonControl_args_out,
		.opnum = 12,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_GetAnyDCName",
		.doc = "S.netr_GetAnyDCName(logon_server, domainname) -> dcname",
		.call = (py_dcerpc_call_fn)dcerpc_netr_GetAnyDCName_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_GetAnyDCName_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_GetAnyDCName_args_out,
		.opnum = 13,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonControl2",
		.doc = "S.netr_LogonControl2(logon_server, function_code, level, data) -> query",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonControl2_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonControl2_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonControl2_args_out,
		.opnum = 14,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerAuthenticate2",
		.doc = "S.netr_ServerAuthenticate2(server_name, account_name, secure_channel_type, computer_name, credentials, negotiate_flags) -> (return_credentials, negotiate_flags)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerAuthenticate2_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerAuthenticate2_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerAuthenticate2_args_out,
		.opnum = 15,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DatabaseSync2",
		.doc = "S.netr_DatabaseSync2(logon_server, computername, credential, return_authenticator, database_id, restart_state, sync_context, preferredmaximumlength) -> (return_authenticator, sync_context, delta_enum_array)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DatabaseSync2_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DatabaseSync2_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DatabaseSync2_args_out,
		.opnum = 16,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DatabaseRedo",
		.doc = "S.netr_DatabaseRedo(logon_server, computername, credential, return_authenticator, change_log_entry, change_log_entry_size) -> (return_authenticator, delta_enum_array)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DatabaseRedo_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DatabaseRedo_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DatabaseRedo_args_out,
		.opnum = 17,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonControl2Ex",
		.doc = "S.netr_LogonControl2Ex(logon_server, function_code, level, data) -> query",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonControl2Ex_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonControl2Ex_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonControl2Ex_args_out,
		.opnum = 18,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_NetrEnumerateTrustedDomains",
		.doc = "S.netr_NetrEnumerateTrustedDomains(server_name) -> trusted_domains_blob",
		.call = (py_dcerpc_call_fn)dcerpc_netr_NetrEnumerateTrustedDomains_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_NetrEnumerateTrustedDomains_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_NetrEnumerateTrustedDomains_args_out,
		.opnum = 19,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsRGetDCName",
		.doc = "S.netr_DsRGetDCName(server_unc, domain_name, domain_guid, site_guid, flags) -> info",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsRGetDCName_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsRGetDCName_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsRGetDCName_args_out,
		.opnum = 20,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonGetCapabilities",
		.doc = "S.netr_LogonGetCapabilities(server_name, computer_name, credential, return_authenticator, query_level) -> (return_authenticator, capabilities)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonGetCapabilities_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonGetCapabilities_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonGetCapabilities_args_out,
		.opnum = 21,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonGetTrustRid",
		.doc = "S.netr_LogonGetTrustRid(server_name, domain_name) -> rid",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonGetTrustRid_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonGetTrustRid_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonGetTrustRid_args_out,
		.opnum = 23,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerAuthenticate3",
		.doc = "S.netr_ServerAuthenticate3(server_name, account_name, secure_channel_type, computer_name, credentials, negotiate_flags) -> (return_credentials, negotiate_flags, rid)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerAuthenticate3_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerAuthenticate3_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerAuthenticate3_args_out,
		.opnum = 26,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsRGetDCNameEx",
		.doc = "S.netr_DsRGetDCNameEx(server_unc, domain_name, domain_guid, site_name, flags) -> info",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsRGetDCNameEx_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsRGetDCNameEx_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsRGetDCNameEx_args_out,
		.opnum = 27,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsRGetSiteName",
		.doc = "S.netr_DsRGetSiteName(computer_name) -> site",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsRGetSiteName_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsRGetSiteName_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsRGetSiteName_args_out,
		.opnum = 28,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonGetDomainInfo",
		.doc = "S.netr_LogonGetDomainInfo(server_name, computer_name, credential, return_authenticator, level, query) -> (return_authenticator, info)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonGetDomainInfo_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonGetDomainInfo_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonGetDomainInfo_args_out,
		.opnum = 29,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerPasswordSet2",
		.doc = "S.netr_ServerPasswordSet2(server_name, account_name, secure_channel_type, computer_name, credential, new_password) -> return_authenticator",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerPasswordSet2_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerPasswordSet2_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerPasswordSet2_args_out,
		.opnum = 30,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerPasswordGet",
		.doc = "S.netr_ServerPasswordGet(server_name, account_name, secure_channel_type, computer_name, credential) -> (return_authenticator, password)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerPasswordGet_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerPasswordGet_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerPasswordGet_args_out,
		.opnum = 31,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_NetrLogonSendToSam",
		.doc = "S.netr_NetrLogonSendToSam(server_name, computer_name, credential, opaque_buffer) -> return_authenticator",
		.call = (py_dcerpc_call_fn)dcerpc_netr_NetrLogonSendToSam_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_NetrLogonSendToSam_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_NetrLogonSendToSam_args_out,
		.opnum = 32,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsRAddressToSitenamesW",
		.doc = "S.netr_DsRAddressToSitenamesW(server_name, addresses) -> ctr",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsRAddressToSitenamesW_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsRAddressToSitenamesW_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsRAddressToSitenamesW_args_out,
		.opnum = 33,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsRGetDCNameEx2",
		.doc = "S.netr_DsRGetDCNameEx2(server_unc, client_account, mask, domain_name, domain_guid, site_name, flags) -> info",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsRGetDCNameEx2_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsRGetDCNameEx2_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsRGetDCNameEx2_args_out,
		.opnum = 34,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_NetrEnumerateTrustedDomainsEx",
		.doc = "S.netr_NetrEnumerateTrustedDomainsEx(server_name) -> dom_trust_list",
		.call = (py_dcerpc_call_fn)dcerpc_netr_NetrEnumerateTrustedDomainsEx_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_NetrEnumerateTrustedDomainsEx_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_NetrEnumerateTrustedDomainsEx_args_out,
		.opnum = 36,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsRAddressToSitenamesExW",
		.doc = "S.netr_DsRAddressToSitenamesExW(server_name, addresses) -> ctr",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsRAddressToSitenamesExW_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsRAddressToSitenamesExW_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsRAddressToSitenamesExW_args_out,
		.opnum = 37,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsrGetDcSiteCoverageW",
		.doc = "S.netr_DsrGetDcSiteCoverageW(server_name) -> ctr",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsrGetDcSiteCoverageW_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsrGetDcSiteCoverageW_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsrGetDcSiteCoverageW_args_out,
		.opnum = 38,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonSamLogonEx",
		.doc = "S.netr_LogonSamLogonEx(server_name, computer_name, logon_level, logon, validation_level, flags) -> (validation, authoritative, flags)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogonEx_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonSamLogonEx_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonSamLogonEx_args_out,
		.opnum = 39,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsrEnumerateDomainTrusts",
		.doc = "S.netr_DsrEnumerateDomainTrusts(server_name, trust_flags) -> trusts",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsrEnumerateDomainTrusts_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsrEnumerateDomainTrusts_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsrEnumerateDomainTrusts_args_out,
		.opnum = 40,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsrDeregisterDNSHostRecords",
		.doc = "S.netr_DsrDeregisterDNSHostRecords(server_name, domain, domain_guid, dsa_guid, dns_host) -> None",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsrDeregisterDNSHostRecords_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsrDeregisterDNSHostRecords_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsrDeregisterDNSHostRecords_args_out,
		.opnum = 41,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerTrustPasswordsGet",
		.doc = "S.netr_ServerTrustPasswordsGet(server_name, account_name, secure_channel_type, computer_name, credential) -> (return_authenticator, new_owf_password, old_owf_password)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerTrustPasswordsGet_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerTrustPasswordsGet_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerTrustPasswordsGet_args_out,
		.opnum = 42,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsRGetForestTrustInformation",
		.doc = "S.netr_DsRGetForestTrustInformation(server_name, trusted_domain_name, flags) -> forest_trust_info",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsRGetForestTrustInformation_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsRGetForestTrustInformation_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsRGetForestTrustInformation_args_out,
		.opnum = 43,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_GetForestTrustInformation",
		.doc = "S.netr_GetForestTrustInformation(server_name, computer_name, credential, flags) -> (return_authenticator, forest_trust_info)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_GetForestTrustInformation_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_GetForestTrustInformation_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_GetForestTrustInformation_args_out,
		.opnum = 44,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_LogonSamLogonWithFlags",
		.doc = "S.netr_LogonSamLogonWithFlags(server_name, computer_name, credential, return_authenticator, logon_level, logon, validation_level, flags) -> (return_authenticator, validation, authoritative, flags)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_LogonSamLogonWithFlags_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_LogonSamLogonWithFlags_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_LogonSamLogonWithFlags_args_out,
		.opnum = 45,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerGetTrustInfo",
		.doc = "S.netr_ServerGetTrustInfo(server_name, account_name, secure_channel_type, computer_name, credential) -> (return_authenticator, new_owf_password, old_owf_password, trust_info)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerGetTrustInfo_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerGetTrustInfo_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerGetTrustInfo_args_out,
		.opnum = 46,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_Unused47",
		.doc = "S.netr_Unused47() -> None",
		.call = (py_dcerpc_call_fn)dcerpc_netr_Unused47_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_Unused47_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_Unused47_args_out,
		.opnum = 47,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_DsrUpdateReadOnlyServerDnsRecords",
		.doc = "S.netr_DsrUpdateReadOnlyServerDnsRecords(server_name, computer_name, credential, site_name, dns_ttl, dns_names) -> (return_authenticator, dns_names)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_out,
		.opnum = 48,
		.table = &ndr_table_netlogon,
	},
	{
		.name = "netr_ServerAuthenticateKerberos",
		.doc = "S.netr_ServerAuthenticateKerberos(server_name, account_name, account_type, computer_name, negotiate_flags) -> (negotiate_flags, rid)",
		.call = (py_dcerpc_call_fn)dcerpc_netr_ServerAuthenticateKerberos_r,
		.pack_in_data = (py_data_pack_fn)pack_py_netr_ServerAuthenticateKerberos_args_in,
		.unpack_out_data = (py_data_unpack_fn)unpack_py_netr_ServerAuthenticateKerberos_args_out,
		.opnum = 59,
		.table = &ndr_table_netlogon,
	},
	{
		.name = NULL,
	},
};

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

static PyTypeObject netlogon_InterfaceType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netlogon",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "netlogon(binding, lp_ctx=None, credentials=None, basis_connection=None) -> connection\n"
"\n\n"
"Parameters\n"
"----------\n"
"binding : str\n"
"    A DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
"lp_ctx : param.LoadParm\n"
"    Should be a path to a smb.conf file or a param.LoadParm object\n"
"credentials : credentials.Credentials, optional\n"
"    A credentials.Credentials object (default is None).\n"
"basis_connection : samba.dcerpc.ClientConnection, optional\n"
"    A netlogon client connection object (default is None).\n"
"\n\n"
"Returns\n"
"-------\n"
"samba.dcerpc.ClientConnection\n"
"    A ClientConnection object\n"
"\n\n"
"Raises\n"
"------\n"
"samba.NTSTATUSError\n"
"    An NTSTATUS error\n"
"\n",
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_netlogon_new,
};

static PyObject *syntax_netlogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_netlogon.syntax_id);
}

static PyTypeObject netlogon_SyntaxType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	.tp_name = "netlogon.netlogon_abstract_syntax",
	.tp_doc = "netlogon_abstract_syntax()\n",
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = syntax_netlogon_new,
};

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

static struct PyModuleDef moduledef = {
	PyModuleDef_HEAD_INIT,
	.m_name = "netlogon",
	.m_doc = "netlogon DCE/RPC",
	.m_size = -1,
	.m_methods = netlogon_methods,
};
MODULE_INIT_FUNC(netlogon)
{
	PyObject *m = NULL;
	PyObject *dep_samba_dcerpc_misc = NULL;
	PyObject *dep_samba_dcerpc_lsa = NULL;
	PyObject *dep_samba_dcerpc_samr = NULL;
	PyObject *dep_samba_dcerpc_security = NULL;
	PyObject *dep_samba_dcerpc_nbt = NULL;
	PyObject *dep_talloc = NULL;
	PyObject *dep_samba_dcerpc_base = NULL;

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

	dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
	if (dep_samba_dcerpc_lsa == NULL)
		goto out;

	dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
	if (dep_samba_dcerpc_samr == NULL)
		goto out;

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

	dep_samba_dcerpc_nbt = PyImport_ImportModule("samba.dcerpc.nbt");
	if (dep_samba_dcerpc_nbt == NULL)
		goto out;

	dep_talloc = PyImport_ImportModule("talloc");
	if (dep_talloc == NULL)
		goto out;

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

	BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
	if (BaseObject_Type == NULL)
		goto out;

	lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
	if (lsa_String_Type == NULL)
		goto out;

	samr_Password_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "Password");
	if (samr_Password_Type == NULL)
		goto out;

	samr_RidWithAttributeArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "RidWithAttributeArray");
	if (samr_RidWithAttributeArray_Type == NULL)
		goto out;

	lsa_StringLarge_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "StringLarge");
	if (lsa_StringLarge_Type == NULL)
		goto out;

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

	samr_LogonHours_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "LogonHours");
	if (samr_LogonHours_Type == NULL)
		goto out;

	lsa_BinaryString_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "BinaryString");
	if (lsa_BinaryString_Type == NULL)
		goto out;

	sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
	if (sec_desc_buf_Type == NULL)
		goto out;

	lsa_SidArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "SidArray");
	if (lsa_SidArray_Type == NULL)
		goto out;

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

	lsa_ForestTrustInformation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "ForestTrustInformation");
	if (lsa_ForestTrustInformation_Type == NULL)
		goto out;

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

	ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
	if (ndr_syntax_id_Type == NULL)
		goto out;

	netr_UasInfo_Type.tp_base = BaseObject_Type;
	netr_UasInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_UasLogoffInfo_Type.tp_base = BaseObject_Type;
	netr_UasLogoffInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_AcctLockStr_Type.tp_base = BaseObject_Type;
	netr_AcctLockStr_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_IdentityInfo_Type.tp_base = BaseObject_Type;
	netr_IdentityInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_PasswordInfo_Type.tp_base = BaseObject_Type;
	netr_PasswordInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ChallengeResponse_Type.tp_base = BaseObject_Type;
	netr_ChallengeResponse_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NetworkInfo_Type.tp_base = BaseObject_Type;
	netr_NetworkInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_GenericInfo_Type.tp_base = BaseObject_Type;
	netr_GenericInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_TicketLogonInfo_Type.tp_base = BaseObject_Type;
	netr_TicketLogonInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonLevel_Type.tp_base = BaseObject_Type;
	netr_LogonLevel_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_UserSessionKey_Type.tp_base = BaseObject_Type;
	netr_UserSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LMSessionKey_Type.tp_base = BaseObject_Type;
	netr_LMSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SamBaseInfo_Type.tp_base = BaseObject_Type;
	netr_SamBaseInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SamInfo2_Type.tp_base = BaseObject_Type;
	netr_SamInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SidAttr_Type.tp_base = BaseObject_Type;
	netr_SidAttr_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SamInfo3_Type.tp_base = BaseObject_Type;
	netr_SamInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SamInfo6_Type.tp_base = BaseObject_Type;
	netr_SamInfo6_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_PacInfo_Type.tp_base = BaseObject_Type;
	netr_PacInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_GenericInfo2_Type.tp_base = BaseObject_Type;
	netr_GenericInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ValidationTicketLogon_Type.tp_base = BaseObject_Type;
	netr_ValidationTicketLogon_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_Validation_Type.tp_base = BaseObject_Type;
	netr_Validation_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_Credential_Type.tp_base = BaseObject_Type;
	netr_Credential_Type.tp_basicsize = pytalloc_BaseObject_size();

	netlogon_server_pipe_state_Type.tp_base = BaseObject_Type;
	netlogon_server_pipe_state_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_Authenticator_Type.tp_base = BaseObject_Type;
	netr_Authenticator_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_DELETE_USER_Type.tp_base = BaseObject_Type;
	netr_DELTA_DELETE_USER_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_USER_KEY16_Type.tp_base = BaseObject_Type;
	netr_USER_KEY16_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_PasswordHistory_Type.tp_base = BaseObject_Type;
	netr_PasswordHistory_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_USER_KEYS2_Type.tp_base = BaseObject_Type;
	netr_USER_KEYS2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_USER_KEY_UNION_Type.tp_base = BaseObject_Type;
	netr_USER_KEY_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_USER_KEYS_Type.tp_base = BaseObject_Type;
	netr_USER_KEYS_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_USER_PRIVATE_INFO_Type.tp_base = BaseObject_Type;
	netr_USER_PRIVATE_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_USER_Type.tp_base = BaseObject_Type;
	netr_DELTA_USER_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_DOMAIN_Type.tp_base = BaseObject_Type;
	netr_DELTA_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_GROUP_Type.tp_base = BaseObject_Type;
	netr_DELTA_GROUP_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_RENAME_Type.tp_base = BaseObject_Type;
	netr_DELTA_RENAME_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_GROUP_MEMBER_Type.tp_base = BaseObject_Type;
	netr_DELTA_GROUP_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_ALIAS_Type.tp_base = BaseObject_Type;
	netr_DELTA_ALIAS_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_ALIAS_MEMBER_Type.tp_base = BaseObject_Type;
	netr_DELTA_ALIAS_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_QUOTA_LIMITS_Type.tp_base = BaseObject_Type;
	netr_QUOTA_LIMITS_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_POLICY_Type.tp_base = BaseObject_Type;
	netr_DELTA_POLICY_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_TRUSTED_DOMAIN_Type.tp_base = BaseObject_Type;
	netr_DELTA_TRUSTED_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_ACCOUNT_Type.tp_base = BaseObject_Type;
	netr_DELTA_ACCOUNT_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_CIPHER_VALUE_Type.tp_base = BaseObject_Type;
	netr_CIPHER_VALUE_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_SECRET_Type.tp_base = BaseObject_Type;
	netr_DELTA_SECRET_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_UNION_Type.tp_base = BaseObject_Type;
	netr_DELTA_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_ID_UNION_Type.tp_base = BaseObject_Type;
	netr_DELTA_ID_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_ENUM_Type.tp_base = BaseObject_Type;
	netr_DELTA_ENUM_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DELTA_ENUM_ARRAY_Type.tp_base = BaseObject_Type;
	netr_DELTA_ENUM_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_UAS_INFO_0_Type.tp_base = BaseObject_Type;
	netr_UAS_INFO_0_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_AccountBuffer_Type.tp_base = BaseObject_Type;
	netr_AccountBuffer_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NETLOGON_INFO_1_Type.tp_base = BaseObject_Type;
	netr_NETLOGON_INFO_1_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NETLOGON_INFO_2_Type.tp_base = BaseObject_Type;
	netr_NETLOGON_INFO_2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NETLOGON_INFO_3_Type.tp_base = BaseObject_Type;
	netr_NETLOGON_INFO_3_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NETLOGON_INFO_4_Type.tp_base = BaseObject_Type;
	netr_NETLOGON_INFO_4_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_CONTROL_QUERY_INFORMATION_Type.tp_base = BaseObject_Type;
	netr_CONTROL_QUERY_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_CONTROL_DATA_INFORMATION_Type.tp_base = BaseObject_Type;
	netr_CONTROL_DATA_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ChangeLogObject_Type.tp_base = BaseObject_Type;
	netr_ChangeLogObject_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ChangeLogEntry_Type.tp_base = BaseObject_Type;
	netr_ChangeLogEntry_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_Blob_Type.tp_base = BaseObject_Type;
	netr_Blob_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRGetDCNameInfo_Type.tp_base = BaseObject_Type;
	netr_DsRGetDCNameInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_Capabilities_Type.tp_base = BaseObject_Type;
	netr_Capabilities_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LsaPolicyInformation_Type.tp_base = BaseObject_Type;
	netr_LsaPolicyInformation_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_OsVersionInfoEx_Type.tp_base = BaseObject_Type;
	netr_OsVersionInfoEx_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_OsVersion_Type.tp_base = BaseObject_Type;
	netr_OsVersion_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_OsVersionContainer_Type.tp_base = BaseObject_Type;
	netr_OsVersionContainer_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_WorkstationInformation_Type.tp_base = BaseObject_Type;
	netr_WorkstationInformation_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_WorkstationInfo_Type.tp_base = BaseObject_Type;
	netr_WorkstationInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_trust_extension_info_Type.tp_base = BaseObject_Type;
	netr_trust_extension_info_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_trust_extension_Type.tp_base = BaseObject_Type;
	netr_trust_extension_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_trust_extension_container_Type.tp_base = BaseObject_Type;
	netr_trust_extension_container_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_OneDomainInfo_Type.tp_base = BaseObject_Type;
	netr_OneDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DomainInformation_Type.tp_base = BaseObject_Type;
	netr_DomainInformation_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DomainInfo_Type.tp_base = BaseObject_Type;
	netr_DomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	NL_PASSWORD_VERSION_Type.tp_base = BaseObject_Type;
	NL_PASSWORD_VERSION_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_CryptPassword_Type.tp_base = BaseObject_Type;
	netr_CryptPassword_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SendToSamResetBadPasswordCount_Type.tp_base = BaseObject_Type;
	netr_SendToSamResetBadPasswordCount_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SendToSamMessage_Type.tp_base = BaseObject_Type;
	netr_SendToSamMessage_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_SendToSamBase_Type.tp_base = BaseObject_Type;
	netr_SendToSamBase_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRAddressToSitenamesWCtr_Type.tp_base = BaseObject_Type;
	netr_DsRAddressToSitenamesWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRAddress_Type.tp_base = BaseObject_Type;
	netr_DsRAddress_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DomainTrust_Type.tp_base = BaseObject_Type;
	netr_DomainTrust_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DomainTrustList_Type.tp_base = BaseObject_Type;
	netr_DomainTrustList_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRAddressToSitenamesExWCtr_Type.tp_base = BaseObject_Type;
	netr_DsRAddressToSitenamesExWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();

	DcSitesCtr_Type.tp_base = BaseObject_Type;
	DcSitesCtr_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_TrustInfo_Type.tp_base = BaseObject_Type;
	netr_TrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	NL_DNS_NAME_INFO_Type.tp_base = BaseObject_Type;
	NL_DNS_NAME_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();

	NL_DNS_NAME_INFO_ARRAY_Type.tp_base = BaseObject_Type;
	NL_DNS_NAME_INFO_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonUasLogon_Type.tp_base = BaseObject_Type;
	netr_LogonUasLogon_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonUasLogoff_Type.tp_base = BaseObject_Type;
	netr_LogonUasLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonSamLogon_Type.tp_base = BaseObject_Type;
	netr_LogonSamLogon_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonSamLogoff_Type.tp_base = BaseObject_Type;
	netr_LogonSamLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerReqChallenge_Type.tp_base = BaseObject_Type;
	netr_ServerReqChallenge_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerAuthenticate_Type.tp_base = BaseObject_Type;
	netr_ServerAuthenticate_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerPasswordSet_Type.tp_base = BaseObject_Type;
	netr_ServerPasswordSet_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DatabaseDeltas_Type.tp_base = BaseObject_Type;
	netr_DatabaseDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DatabaseSync_Type.tp_base = BaseObject_Type;
	netr_DatabaseSync_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_AccountDeltas_Type.tp_base = BaseObject_Type;
	netr_AccountDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_AccountSync_Type.tp_base = BaseObject_Type;
	netr_AccountSync_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_GetDcName_Type.tp_base = BaseObject_Type;
	netr_GetDcName_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonControl_Type.tp_base = BaseObject_Type;
	netr_LogonControl_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_GetAnyDCName_Type.tp_base = BaseObject_Type;
	netr_GetAnyDCName_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonControl2_Type.tp_base = BaseObject_Type;
	netr_LogonControl2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerAuthenticate2_Type.tp_base = BaseObject_Type;
	netr_ServerAuthenticate2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DatabaseSync2_Type.tp_base = BaseObject_Type;
	netr_DatabaseSync2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DatabaseRedo_Type.tp_base = BaseObject_Type;
	netr_DatabaseRedo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonControl2Ex_Type.tp_base = BaseObject_Type;
	netr_LogonControl2Ex_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NetrEnumerateTrustedDomains_Type.tp_base = BaseObject_Type;
	netr_NetrEnumerateTrustedDomains_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRGetDCName_Type.tp_base = BaseObject_Type;
	netr_DsRGetDCName_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonGetCapabilities_Type.tp_base = BaseObject_Type;
	netr_LogonGetCapabilities_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonGetTrustRid_Type.tp_base = BaseObject_Type;
	netr_LogonGetTrustRid_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerAuthenticate3_Type.tp_base = BaseObject_Type;
	netr_ServerAuthenticate3_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRGetDCNameEx_Type.tp_base = BaseObject_Type;
	netr_DsRGetDCNameEx_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRGetSiteName_Type.tp_base = BaseObject_Type;
	netr_DsRGetSiteName_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonGetDomainInfo_Type.tp_base = BaseObject_Type;
	netr_LogonGetDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerPasswordSet2_Type.tp_base = BaseObject_Type;
	netr_ServerPasswordSet2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerPasswordGet_Type.tp_base = BaseObject_Type;
	netr_ServerPasswordGet_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NetrLogonSendToSam_Type.tp_base = BaseObject_Type;
	netr_NetrLogonSendToSam_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRAddressToSitenamesW_Type.tp_base = BaseObject_Type;
	netr_DsRAddressToSitenamesW_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRGetDCNameEx2_Type.tp_base = BaseObject_Type;
	netr_DsRGetDCNameEx2_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_NetrEnumerateTrustedDomainsEx_Type.tp_base = BaseObject_Type;
	netr_NetrEnumerateTrustedDomainsEx_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRAddressToSitenamesExW_Type.tp_base = BaseObject_Type;
	netr_DsRAddressToSitenamesExW_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsrGetDcSiteCoverageW_Type.tp_base = BaseObject_Type;
	netr_DsrGetDcSiteCoverageW_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonSamLogonEx_Type.tp_base = BaseObject_Type;
	netr_LogonSamLogonEx_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsrEnumerateDomainTrusts_Type.tp_base = BaseObject_Type;
	netr_DsrEnumerateDomainTrusts_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsrDeregisterDNSHostRecords_Type.tp_base = BaseObject_Type;
	netr_DsrDeregisterDNSHostRecords_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerTrustPasswordsGet_Type.tp_base = BaseObject_Type;
	netr_ServerTrustPasswordsGet_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsRGetForestTrustInformation_Type.tp_base = BaseObject_Type;
	netr_DsRGetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_GetForestTrustInformation_Type.tp_base = BaseObject_Type;
	netr_GetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_LogonSamLogonWithFlags_Type.tp_base = BaseObject_Type;
	netr_LogonSamLogonWithFlags_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerGetTrustInfo_Type.tp_base = BaseObject_Type;
	netr_ServerGetTrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_Unused47_Type.tp_base = BaseObject_Type;
	netr_Unused47_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_base = BaseObject_Type;
	netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_basicsize = pytalloc_BaseObject_size();

	netr_ServerAuthenticateKerberos_Type.tp_base = BaseObject_Type;
	netr_ServerAuthenticateKerberos_Type.tp_basicsize = pytalloc_BaseObject_size();

	netlogon_InterfaceType.tp_base = ClientConnection_Type;

	netlogon_SyntaxType.tp_base = ndr_syntax_id_Type;
	netlogon_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();

	if (PyType_Ready(&netr_UasInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_UasLogoffInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_AcctLockStr_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_IdentityInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_PasswordInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ChallengeResponse_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NetworkInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_GenericInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_TicketLogonInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonLevel_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_UserSessionKey_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LMSessionKey_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SamBaseInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SamInfo2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SidAttr_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SamInfo3_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SamInfo6_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_PacInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_GenericInfo2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ValidationTicketLogon_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_Validation_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_Credential_Type) < 0)
		goto out;
	if (PyType_Ready(&netlogon_server_pipe_state_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_Authenticator_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_DELETE_USER_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_USER_KEY16_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_PasswordHistory_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_USER_KEYS2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_USER_KEY_UNION_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_USER_KEYS_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_USER_PRIVATE_INFO_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_USER_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_DOMAIN_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_GROUP_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_RENAME_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_GROUP_MEMBER_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_ALIAS_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_ALIAS_MEMBER_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_QUOTA_LIMITS_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_POLICY_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_TRUSTED_DOMAIN_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_ACCOUNT_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_CIPHER_VALUE_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_SECRET_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_UNION_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_ID_UNION_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_ENUM_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DELTA_ENUM_ARRAY_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_UAS_INFO_0_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_AccountBuffer_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NETLOGON_INFO_1_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NETLOGON_INFO_2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NETLOGON_INFO_3_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NETLOGON_INFO_4_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_CONTROL_QUERY_INFORMATION_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_CONTROL_DATA_INFORMATION_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ChangeLogObject_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ChangeLogEntry_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_Blob_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRGetDCNameInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_Capabilities_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LsaPolicyInformation_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_OsVersionInfoEx_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_OsVersion_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_OsVersionContainer_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_WorkstationInformation_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_WorkstationInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_trust_extension_info_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_trust_extension_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_trust_extension_container_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_OneDomainInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DomainInformation_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DomainInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&NL_PASSWORD_VERSION_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_CryptPassword_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SendToSamResetBadPasswordCount_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SendToSamMessage_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_SendToSamBase_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRAddressToSitenamesWCtr_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRAddress_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DomainTrust_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DomainTrustList_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRAddressToSitenamesExWCtr_Type) < 0)
		goto out;
	if (PyType_Ready(&DcSitesCtr_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_TrustInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&NL_DNS_NAME_INFO_Type) < 0)
		goto out;
	if (PyType_Ready(&NL_DNS_NAME_INFO_ARRAY_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonUasLogon_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonUasLogoff_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonSamLogon_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonSamLogoff_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerReqChallenge_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerAuthenticate_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerPasswordSet_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DatabaseDeltas_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DatabaseSync_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_AccountDeltas_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_AccountSync_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_GetDcName_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonControl_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_GetAnyDCName_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonControl2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerAuthenticate2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DatabaseSync2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DatabaseRedo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonControl2Ex_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NetrEnumerateTrustedDomains_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRGetDCName_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonGetCapabilities_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonGetTrustRid_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerAuthenticate3_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRGetDCNameEx_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRGetSiteName_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonGetDomainInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerPasswordSet2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerPasswordGet_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NetrLogonSendToSam_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRAddressToSitenamesW_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRGetDCNameEx2_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_NetrEnumerateTrustedDomainsEx_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRAddressToSitenamesExW_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsrGetDcSiteCoverageW_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonSamLogonEx_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsrEnumerateDomainTrusts_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsrDeregisterDNSHostRecords_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerTrustPasswordsGet_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsRGetForestTrustInformation_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_GetForestTrustInformation_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_LogonSamLogonWithFlags_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerGetTrustInfo_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_Unused47_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_DsrUpdateReadOnlyServerDnsRecords_Type) < 0)
		goto out;
	if (PyType_Ready(&netr_ServerAuthenticateKerberos_Type) < 0)
		goto out;
	if (PyType_Ready(&netlogon_InterfaceType) < 0)
		goto out;
	if (PyType_Ready(&netlogon_SyntaxType) < 0)
		goto out;
	if (!PyInterface_AddNdrRpcMethods(&netlogon_InterfaceType, py_ndr_netlogon_methods))
		return NULL;

#ifdef PY_NETR_UASINFO_PATCH
	PY_NETR_UASINFO_PATCH(&netr_UasInfo_Type);
#endif
#ifdef PY_NETR_UASLOGOFFINFO_PATCH
	PY_NETR_UASLOGOFFINFO_PATCH(&netr_UasLogoffInfo_Type);
#endif
#ifdef PY_NETR_ACCTLOCKSTR_PATCH
	PY_NETR_ACCTLOCKSTR_PATCH(&netr_AcctLockStr_Type);
#endif
#ifdef PY_NETR_IDENTITYINFO_PATCH
	PY_NETR_IDENTITYINFO_PATCH(&netr_IdentityInfo_Type);
#endif
#ifdef PY_NETR_PASSWORDINFO_PATCH
	PY_NETR_PASSWORDINFO_PATCH(&netr_PasswordInfo_Type);
#endif
#ifdef PY_NETR_CHALLENGERESPONSE_PATCH
	PY_NETR_CHALLENGERESPONSE_PATCH(&netr_ChallengeResponse_Type);
#endif
#ifdef PY_NETR_NETWORKINFO_PATCH
	PY_NETR_NETWORKINFO_PATCH(&netr_NetworkInfo_Type);
#endif
#ifdef PY_NETR_GENERICINFO_PATCH
	PY_NETR_GENERICINFO_PATCH(&netr_GenericInfo_Type);
#endif
#ifdef PY_NETR_TICKETLOGONINFO_PATCH
	PY_NETR_TICKETLOGONINFO_PATCH(&netr_TicketLogonInfo_Type);
#endif
#ifdef PY_NETR_LOGONLEVEL_PATCH
	PY_NETR_LOGONLEVEL_PATCH(&netr_LogonLevel_Type);
#endif
#ifdef PY_NETR_USERSESSIONKEY_PATCH
	PY_NETR_USERSESSIONKEY_PATCH(&netr_UserSessionKey_Type);
#endif
#ifdef PY_NETR_LMSESSIONKEY_PATCH
	PY_NETR_LMSESSIONKEY_PATCH(&netr_LMSessionKey_Type);
#endif
#ifdef PY_NETR_SAMBASEINFO_PATCH
	PY_NETR_SAMBASEINFO_PATCH(&netr_SamBaseInfo_Type);
#endif
#ifdef PY_NETR_SAMINFO2_PATCH
	PY_NETR_SAMINFO2_PATCH(&netr_SamInfo2_Type);
#endif
#ifdef PY_NETR_SIDATTR_PATCH
	PY_NETR_SIDATTR_PATCH(&netr_SidAttr_Type);
#endif
#ifdef PY_NETR_SAMINFO3_PATCH
	PY_NETR_SAMINFO3_PATCH(&netr_SamInfo3_Type);
#endif
#ifdef PY_NETR_SAMINFO6_PATCH
	PY_NETR_SAMINFO6_PATCH(&netr_SamInfo6_Type);
#endif
#ifdef PY_NETR_PACINFO_PATCH
	PY_NETR_PACINFO_PATCH(&netr_PacInfo_Type);
#endif
#ifdef PY_NETR_GENERICINFO2_PATCH
	PY_NETR_GENERICINFO2_PATCH(&netr_GenericInfo2_Type);
#endif
#ifdef PY_NETR_VALIDATIONTICKETLOGON_PATCH
	PY_NETR_VALIDATIONTICKETLOGON_PATCH(&netr_ValidationTicketLogon_Type);
#endif
#ifdef PY_NETR_VALIDATION_PATCH
	PY_NETR_VALIDATION_PATCH(&netr_Validation_Type);
#endif
#ifdef PY_NETR_CREDENTIAL_PATCH
	PY_NETR_CREDENTIAL_PATCH(&netr_Credential_Type);
#endif
#ifdef PY_SERVER_PIPE_STATE_PATCH
	PY_SERVER_PIPE_STATE_PATCH(&netlogon_server_pipe_state_Type);
#endif
#ifdef PY_NETR_AUTHENTICATOR_PATCH
	PY_NETR_AUTHENTICATOR_PATCH(&netr_Authenticator_Type);
#endif
#ifdef PY_NETR_DELTA_DELETE_USER_PATCH
	PY_NETR_DELTA_DELETE_USER_PATCH(&netr_DELTA_DELETE_USER_Type);
#endif
#ifdef PY_NETR_USER_KEY16_PATCH
	PY_NETR_USER_KEY16_PATCH(&netr_USER_KEY16_Type);
#endif
#ifdef PY_NETR_PASSWORDHISTORY_PATCH
	PY_NETR_PASSWORDHISTORY_PATCH(&netr_PasswordHistory_Type);
#endif
#ifdef PY_NETR_USER_KEYS2_PATCH
	PY_NETR_USER_KEYS2_PATCH(&netr_USER_KEYS2_Type);
#endif
#ifdef PY_NETR_USER_KEY_UNION_PATCH
	PY_NETR_USER_KEY_UNION_PATCH(&netr_USER_KEY_UNION_Type);
#endif
#ifdef PY_NETR_USER_KEYS_PATCH
	PY_NETR_USER_KEYS_PATCH(&netr_USER_KEYS_Type);
#endif
#ifdef PY_NETR_USER_PRIVATE_INFO_PATCH
	PY_NETR_USER_PRIVATE_INFO_PATCH(&netr_USER_PRIVATE_INFO_Type);
#endif
#ifdef PY_NETR_DELTA_USER_PATCH
	PY_NETR_DELTA_USER_PATCH(&netr_DELTA_USER_Type);
#endif
#ifdef PY_NETR_DELTA_DOMAIN_PATCH
	PY_NETR_DELTA_DOMAIN_PATCH(&netr_DELTA_DOMAIN_Type);
#endif
#ifdef PY_NETR_DELTA_GROUP_PATCH
	PY_NETR_DELTA_GROUP_PATCH(&netr_DELTA_GROUP_Type);
#endif
#ifdef PY_NETR_DELTA_RENAME_PATCH
	PY_NETR_DELTA_RENAME_PATCH(&netr_DELTA_RENAME_Type);
#endif
#ifdef PY_NETR_DELTA_GROUP_MEMBER_PATCH
	PY_NETR_DELTA_GROUP_MEMBER_PATCH(&netr_DELTA_GROUP_MEMBER_Type);
#endif
#ifdef PY_NETR_DELTA_ALIAS_PATCH
	PY_NETR_DELTA_ALIAS_PATCH(&netr_DELTA_ALIAS_Type);
#endif
#ifdef PY_NETR_DELTA_ALIAS_MEMBER_PATCH
	PY_NETR_DELTA_ALIAS_MEMBER_PATCH(&netr_DELTA_ALIAS_MEMBER_Type);
#endif
#ifdef PY_NETR_QUOTA_LIMITS_PATCH
	PY_NETR_QUOTA_LIMITS_PATCH(&netr_QUOTA_LIMITS_Type);
#endif
#ifdef PY_NETR_DELTA_POLICY_PATCH
	PY_NETR_DELTA_POLICY_PATCH(&netr_DELTA_POLICY_Type);
#endif
#ifdef PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH
	PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH(&netr_DELTA_TRUSTED_DOMAIN_Type);
#endif
#ifdef PY_NETR_DELTA_ACCOUNT_PATCH
	PY_NETR_DELTA_ACCOUNT_PATCH(&netr_DELTA_ACCOUNT_Type);
#endif
#ifdef PY_NETR_CIPHER_VALUE_PATCH
	PY_NETR_CIPHER_VALUE_PATCH(&netr_CIPHER_VALUE_Type);
#endif
#ifdef PY_NETR_DELTA_SECRET_PATCH
	PY_NETR_DELTA_SECRET_PATCH(&netr_DELTA_SECRET_Type);
#endif
#ifdef PY_NETR_DELTA_UNION_PATCH
	PY_NETR_DELTA_UNION_PATCH(&netr_DELTA_UNION_Type);
#endif
#ifdef PY_NETR_DELTA_ID_UNION_PATCH
	PY_NETR_DELTA_ID_UNION_PATCH(&netr_DELTA_ID_UNION_Type);
#endif
#ifdef PY_NETR_DELTA_ENUM_PATCH
	PY_NETR_DELTA_ENUM_PATCH(&netr_DELTA_ENUM_Type);
#endif
#ifdef PY_NETR_DELTA_ENUM_ARRAY_PATCH
	PY_NETR_DELTA_ENUM_ARRAY_PATCH(&netr_DELTA_ENUM_ARRAY_Type);
#endif
#ifdef PY_NETR_UAS_INFO_0_PATCH
	PY_NETR_UAS_INFO_0_PATCH(&netr_UAS_INFO_0_Type);
#endif
#ifdef PY_NETR_ACCOUNTBUFFER_PATCH
	PY_NETR_ACCOUNTBUFFER_PATCH(&netr_AccountBuffer_Type);
#endif
#ifdef PY_NETR_NETLOGON_INFO_1_PATCH
	PY_NETR_NETLOGON_INFO_1_PATCH(&netr_NETLOGON_INFO_1_Type);
#endif
#ifdef PY_NETR_NETLOGON_INFO_2_PATCH
	PY_NETR_NETLOGON_INFO_2_PATCH(&netr_NETLOGON_INFO_2_Type);
#endif
#ifdef PY_NETR_NETLOGON_INFO_3_PATCH
	PY_NETR_NETLOGON_INFO_3_PATCH(&netr_NETLOGON_INFO_3_Type);
#endif
#ifdef PY_NETR_NETLOGON_INFO_4_PATCH
	PY_NETR_NETLOGON_INFO_4_PATCH(&netr_NETLOGON_INFO_4_Type);
#endif
#ifdef PY_NETR_CONTROL_QUERY_INFORMATION_PATCH
	PY_NETR_CONTROL_QUERY_INFORMATION_PATCH(&netr_CONTROL_QUERY_INFORMATION_Type);
#endif
#ifdef PY_NETR_CONTROL_DATA_INFORMATION_PATCH
	PY_NETR_CONTROL_DATA_INFORMATION_PATCH(&netr_CONTROL_DATA_INFORMATION_Type);
#endif
#ifdef PY_NETR_CHANGELOGOBJECT_PATCH
	PY_NETR_CHANGELOGOBJECT_PATCH(&netr_ChangeLogObject_Type);
#endif
#ifdef PY_NETR_CHANGELOGENTRY_PATCH
	PY_NETR_CHANGELOGENTRY_PATCH(&netr_ChangeLogEntry_Type);
#endif
#ifdef PY_NETR_BLOB_PATCH
	PY_NETR_BLOB_PATCH(&netr_Blob_Type);
#endif
#ifdef PY_NETR_DSRGETDCNAMEINFO_PATCH
	PY_NETR_DSRGETDCNAMEINFO_PATCH(&netr_DsRGetDCNameInfo_Type);
#endif
#ifdef PY_NETR_CAPABILITIES_PATCH
	PY_NETR_CAPABILITIES_PATCH(&netr_Capabilities_Type);
#endif
#ifdef PY_NETR_LSAPOLICYINFORMATION_PATCH
	PY_NETR_LSAPOLICYINFORMATION_PATCH(&netr_LsaPolicyInformation_Type);
#endif
#ifdef PY_NETR_OSVERSIONINFOEX_PATCH
	PY_NETR_OSVERSIONINFOEX_PATCH(&netr_OsVersionInfoEx_Type);
#endif
#ifdef PY_NETR_OSVERSION_PATCH
	PY_NETR_OSVERSION_PATCH(&netr_OsVersion_Type);
#endif
#ifdef PY_NETR_OSVERSIONCONTAINER_PATCH
	PY_NETR_OSVERSIONCONTAINER_PATCH(&netr_OsVersionContainer_Type);
#endif
#ifdef PY_NETR_WORKSTATIONINFORMATION_PATCH
	PY_NETR_WORKSTATIONINFORMATION_PATCH(&netr_WorkstationInformation_Type);
#endif
#ifdef PY_NETR_WORKSTATIONINFO_PATCH
	PY_NETR_WORKSTATIONINFO_PATCH(&netr_WorkstationInfo_Type);
#endif
#ifdef PY_NETR_TRUST_EXTENSION_INFO_PATCH
	PY_NETR_TRUST_EXTENSION_INFO_PATCH(&netr_trust_extension_info_Type);
#endif
#ifdef PY_NETR_TRUST_EXTENSION_PATCH
	PY_NETR_TRUST_EXTENSION_PATCH(&netr_trust_extension_Type);
#endif
#ifdef PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH
	PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH(&netr_trust_extension_container_Type);
#endif
#ifdef PY_NETR_ONEDOMAININFO_PATCH
	PY_NETR_ONEDOMAININFO_PATCH(&netr_OneDomainInfo_Type);
#endif
#ifdef PY_NETR_DOMAININFORMATION_PATCH
	PY_NETR_DOMAININFORMATION_PATCH(&netr_DomainInformation_Type);
#endif
#ifdef PY_NETR_DOMAININFO_PATCH
	PY_NETR_DOMAININFO_PATCH(&netr_DomainInfo_Type);
#endif
#ifdef PY_NL_PASSWORD_VERSION_PATCH
	PY_NL_PASSWORD_VERSION_PATCH(&NL_PASSWORD_VERSION_Type);
#endif
#ifdef PY_NETR_CRYPTPASSWORD_PATCH
	PY_NETR_CRYPTPASSWORD_PATCH(&netr_CryptPassword_Type);
#endif
#ifdef PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH
	PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH(&netr_SendToSamResetBadPasswordCount_Type);
#endif
#ifdef PY_NETR_SENDTOSAMMESSAGE_PATCH
	PY_NETR_SENDTOSAMMESSAGE_PATCH(&netr_SendToSamMessage_Type);
#endif
#ifdef PY_NETR_SENDTOSAMBASE_PATCH
	PY_NETR_SENDTOSAMBASE_PATCH(&netr_SendToSamBase_Type);
#endif
#ifdef PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH
	PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH(&netr_DsRAddressToSitenamesWCtr_Type);
#endif
#ifdef PY_NETR_DSRADDRESS_PATCH
	PY_NETR_DSRADDRESS_PATCH(&netr_DsRAddress_Type);
#endif
#ifdef PY_NETR_DOMAINTRUST_PATCH
	PY_NETR_DOMAINTRUST_PATCH(&netr_DomainTrust_Type);
#endif
#ifdef PY_NETR_DOMAINTRUSTLIST_PATCH
	PY_NETR_DOMAINTRUSTLIST_PATCH(&netr_DomainTrustList_Type);
#endif
#ifdef PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH
	PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH(&netr_DsRAddressToSitenamesExWCtr_Type);
#endif
#ifdef PY_DCSITESCTR_PATCH
	PY_DCSITESCTR_PATCH(&DcSitesCtr_Type);
#endif
#ifdef PY_NETR_TRUSTINFO_PATCH
	PY_NETR_TRUSTINFO_PATCH(&netr_TrustInfo_Type);
#endif
#ifdef PY_NL_DNS_NAME_INFO_PATCH
	PY_NL_DNS_NAME_INFO_PATCH(&NL_DNS_NAME_INFO_Type);
#endif
#ifdef PY_NL_DNS_NAME_INFO_ARRAY_PATCH
	PY_NL_DNS_NAME_INFO_ARRAY_PATCH(&NL_DNS_NAME_INFO_ARRAY_Type);
#endif
#ifdef PY_NETR_LOGONUASLOGON_PATCH
	PY_NETR_LOGONUASLOGON_PATCH(&netr_LogonUasLogon_Type);
#endif
#ifdef PY_NETR_LOGONUASLOGOFF_PATCH
	PY_NETR_LOGONUASLOGOFF_PATCH(&netr_LogonUasLogoff_Type);
#endif
#ifdef PY_NETR_LOGONSAMLOGON_PATCH
	PY_NETR_LOGONSAMLOGON_PATCH(&netr_LogonSamLogon_Type);
#endif
#ifdef PY_NETR_LOGONSAMLOGOFF_PATCH
	PY_NETR_LOGONSAMLOGOFF_PATCH(&netr_LogonSamLogoff_Type);
#endif
#ifdef PY_NETR_SERVERREQCHALLENGE_PATCH
	PY_NETR_SERVERREQCHALLENGE_PATCH(&netr_ServerReqChallenge_Type);
#endif
#ifdef PY_NETR_SERVERAUTHENTICATE_PATCH
	PY_NETR_SERVERAUTHENTICATE_PATCH(&netr_ServerAuthenticate_Type);
#endif
#ifdef PY_NETR_SERVERPASSWORDSET_PATCH
	PY_NETR_SERVERPASSWORDSET_PATCH(&netr_ServerPasswordSet_Type);
#endif
#ifdef PY_NETR_DATABASEDELTAS_PATCH
	PY_NETR_DATABASEDELTAS_PATCH(&netr_DatabaseDeltas_Type);
#endif
#ifdef PY_NETR_DATABASESYNC_PATCH
	PY_NETR_DATABASESYNC_PATCH(&netr_DatabaseSync_Type);
#endif
#ifdef PY_NETR_ACCOUNTDELTAS_PATCH
	PY_NETR_ACCOUNTDELTAS_PATCH(&netr_AccountDeltas_Type);
#endif
#ifdef PY_NETR_ACCOUNTSYNC_PATCH
	PY_NETR_ACCOUNTSYNC_PATCH(&netr_AccountSync_Type);
#endif
#ifdef PY_NETR_GETDCNAME_PATCH
	PY_NETR_GETDCNAME_PATCH(&netr_GetDcName_Type);
#endif
#ifdef PY_NETR_LOGONCONTROL_PATCH
	PY_NETR_LOGONCONTROL_PATCH(&netr_LogonControl_Type);
#endif
#ifdef PY_NETR_GETANYDCNAME_PATCH
	PY_NETR_GETANYDCNAME_PATCH(&netr_GetAnyDCName_Type);
#endif
#ifdef PY_NETR_LOGONCONTROL2_PATCH
	PY_NETR_LOGONCONTROL2_PATCH(&netr_LogonControl2_Type);
#endif
#ifdef PY_NETR_SERVERAUTHENTICATE2_PATCH
	PY_NETR_SERVERAUTHENTICATE2_PATCH(&netr_ServerAuthenticate2_Type);
#endif
#ifdef PY_NETR_DATABASESYNC2_PATCH
	PY_NETR_DATABASESYNC2_PATCH(&netr_DatabaseSync2_Type);
#endif
#ifdef PY_NETR_DATABASEREDO_PATCH
	PY_NETR_DATABASEREDO_PATCH(&netr_DatabaseRedo_Type);
#endif
#ifdef PY_NETR_LOGONCONTROL2EX_PATCH
	PY_NETR_LOGONCONTROL2EX_PATCH(&netr_LogonControl2Ex_Type);
#endif
#ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH
	PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH(&netr_NetrEnumerateTrustedDomains_Type);
#endif
#ifdef PY_NETR_DSRGETDCNAME_PATCH
	PY_NETR_DSRGETDCNAME_PATCH(&netr_DsRGetDCName_Type);
#endif
#ifdef PY_NETR_LOGONGETCAPABILITIES_PATCH
	PY_NETR_LOGONGETCAPABILITIES_PATCH(&netr_LogonGetCapabilities_Type);
#endif
#ifdef PY_NETR_LOGONGETTRUSTRID_PATCH
	PY_NETR_LOGONGETTRUSTRID_PATCH(&netr_LogonGetTrustRid_Type);
#endif
#ifdef PY_NETR_SERVERAUTHENTICATE3_PATCH
	PY_NETR_SERVERAUTHENTICATE3_PATCH(&netr_ServerAuthenticate3_Type);
#endif
#ifdef PY_NETR_DSRGETDCNAMEEX_PATCH
	PY_NETR_DSRGETDCNAMEEX_PATCH(&netr_DsRGetDCNameEx_Type);
#endif
#ifdef PY_NETR_DSRGETSITENAME_PATCH
	PY_NETR_DSRGETSITENAME_PATCH(&netr_DsRGetSiteName_Type);
#endif
#ifdef PY_NETR_LOGONGETDOMAININFO_PATCH
	PY_NETR_LOGONGETDOMAININFO_PATCH(&netr_LogonGetDomainInfo_Type);
#endif
#ifdef PY_NETR_SERVERPASSWORDSET2_PATCH
	PY_NETR_SERVERPASSWORDSET2_PATCH(&netr_ServerPasswordSet2_Type);
#endif
#ifdef PY_NETR_SERVERPASSWORDGET_PATCH
	PY_NETR_SERVERPASSWORDGET_PATCH(&netr_ServerPasswordGet_Type);
#endif
#ifdef PY_NETR_NETRLOGONSENDTOSAM_PATCH
	PY_NETR_NETRLOGONSENDTOSAM_PATCH(&netr_NetrLogonSendToSam_Type);
#endif
#ifdef PY_NETR_DSRADDRESSTOSITENAMESW_PATCH
	PY_NETR_DSRADDRESSTOSITENAMESW_PATCH(&netr_DsRAddressToSitenamesW_Type);
#endif
#ifdef PY_NETR_DSRGETDCNAMEEX2_PATCH
	PY_NETR_DSRGETDCNAMEEX2_PATCH(&netr_DsRGetDCNameEx2_Type);
#endif
#ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH
	PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH(&netr_NetrEnumerateTrustedDomainsEx_Type);
#endif
#ifdef PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH
	PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH(&netr_DsRAddressToSitenamesExW_Type);
#endif
#ifdef PY_NETR_DSRGETDCSITECOVERAGEW_PATCH
	PY_NETR_DSRGETDCSITECOVERAGEW_PATCH(&netr_DsrGetDcSiteCoverageW_Type);
#endif
#ifdef PY_NETR_LOGONSAMLOGONEX_PATCH
	PY_NETR_LOGONSAMLOGONEX_PATCH(&netr_LogonSamLogonEx_Type);
#endif
#ifdef PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH
	PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH(&netr_DsrEnumerateDomainTrusts_Type);
#endif
#ifdef PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH
	PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH(&netr_DsrDeregisterDNSHostRecords_Type);
#endif
#ifdef PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH
	PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH(&netr_ServerTrustPasswordsGet_Type);
#endif
#ifdef PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH
	PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH(&netr_DsRGetForestTrustInformation_Type);
#endif
#ifdef PY_NETR_GETFORESTTRUSTINFORMATION_PATCH
	PY_NETR_GETFORESTTRUSTINFORMATION_PATCH(&netr_GetForestTrustInformation_Type);
#endif
#ifdef PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH
	PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH(&netr_LogonSamLogonWithFlags_Type);
#endif
#ifdef PY_NETR_SERVERGETTRUSTINFO_PATCH
	PY_NETR_SERVERGETTRUSTINFO_PATCH(&netr_ServerGetTrustInfo_Type);
#endif
#ifdef PY_NETR_UNUSED47_PATCH
	PY_NETR_UNUSED47_PATCH(&netr_Unused47_Type);
#endif
#ifdef PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH
	PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH(&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
#endif
#ifdef PY_NETR_SERVERAUTHENTICATEKERBEROS_PATCH
	PY_NETR_SERVERAUTHENTICATEKERBEROS_PATCH(&netr_ServerAuthenticateKerberos_Type);
#endif
#ifdef PY_NETLOGON_PATCH
	PY_NETLOGON_PATCH(&netlogon_InterfaceType);
#endif
#ifdef PY_NETLOGON_ABSTRACT_SYNTAX_PATCH
	PY_NETLOGON_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
#endif
#ifdef PY_ABSTRACT_SYNTAX_PATCH
	PY_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
#endif

	m = PyModule_Create(&moduledef);
	if (m == NULL)
		goto out;

	PyModule_AddObject(m, "NETLOGON_NEG_128BIT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_STRONG_KEYS)));
	PyModule_AddObject(m, "NETLOGON_NEG_SCHANNEL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AUTHENTICATED_RPC)));
	PyModule_AddObject(m, "DSGETDC_VALID_FLAGS", PyLong_FromLong((DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_TRY_NEXTCLOSEST_SITE|DS_DIRECTORY_SERVICE_6_REQUIRED|DS_WEB_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_8_REQUIRED|DS_DIRECTORY_SERVICE_9_REQUIRED|DS_DIRECTORY_SERVICE_10_REQUIRED|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME)));
	PyModule_AddObject(m, "NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT", PyLong_FromUnsignedLongLong(0x02231968));
	PyModule_AddObject(m, "DS_GFTI_UPDATE_TDO", PyLong_FromUnsignedLongLong(0x1));
	PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_CLEARTEXT_PASSWORD_ALLOWED)));
	PyModule_AddObject(m, "MSV1_0_UPDATE_LOGON_STATISTICS", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_UPDATE_LOGON_STATISTICS)));
	PyModule_AddObject(m, "MSV1_0_RETURN_USER_PARAMETERS", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_RETURN_USER_PARAMETERS)));
	PyModule_AddObject(m, "MSV1_0_DONT_TRY_GUEST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_DONT_TRY_GUEST_ACCOUNT)));
	PyModule_AddObject(m, "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT)));
	PyModule_AddObject(m, "MSV1_0_RETURN_PASSWORD_EXPIRY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_RETURN_PASSWORD_EXPIRY)));
	PyModule_AddObject(m, "MSV1_0_USE_CLIENT_CHALLENGE", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_USE_CLIENT_CHALLENGE)));
	PyModule_AddObject(m, "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_TRY_GUEST_ACCOUNT_ONLY)));
	PyModule_AddObject(m, "MSV1_0_RETURN_PROFILE_PATH", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_RETURN_PROFILE_PATH)));
	PyModule_AddObject(m, "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY)));
	PyModule_AddObject(m, "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT)));
	PyModule_AddObject(m, "MSV1_0_DISABLE_PERSONAL_FALLBACK", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_DISABLE_PERSONAL_FALLBACK)));
	PyModule_AddObject(m, "MSV1_0_ALLOW_FORCE_GUEST", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_FORCE_GUEST)));
	PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED)));
	PyModule_AddObject(m, "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY)));
	PyModule_AddObject(m, "MSV1_0_ALLOW_MSVCHAPV2", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_ALLOW_MSVCHAPV2)));
	PyModule_AddObject(m, "MSV1_0_S4U2SELF", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_S4U2SELF)));
	PyModule_AddObject(m, "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_CHECK_LOGONHOURS_FOR_S4U)));
	PyModule_AddObject(m, "MSV1_0_SUBAUTHENTICATION_DLL_EX", PyLong_FromUnsignedLongLong((uint32_t)(MSV1_0_SUBAUTHENTICATION_DLL_EX)));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_CRITICAL_OPTIONS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_CRITICAL_OPTIONS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_NO_AUTHORIZATION_DATA", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_NO_AUTHORIZATION_DATA));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_COMPUTER_DOMAIN_OPTIONS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_COMPUTER_DOMAIN_OPTIONS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SKIP_RESOURCE_GROUPS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SKIP_RESOURCE_GROUPS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SKIP_A2A_CHECKS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SKIP_A2A_CHECKS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_TRANSIT_OPTIONS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_TRANSIT_OPTIONS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SKIP_SID_FILTER", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SKIP_SID_FILTER));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SKIP_NAMESPACE_FILTER", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SKIP_NAMESPACE_FILTER));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_KERBEROS_OPTIONS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_KERBEROS_OPTIONS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SKIP_PAC_SIGNATURES", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SKIP_PAC_SIGNATURES));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_REMOVE_RESOURCE_GROUPS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_REMOVE_RESOURCE_GROUPS));
	PyModule_AddObject(m, "NetlogonInteractiveInformation", PyLong_FromLong((uint16_t)(NetlogonInteractiveInformation)));
	PyModule_AddObject(m, "NetlogonNetworkInformation", PyLong_FromLong((uint16_t)(NetlogonNetworkInformation)));
	PyModule_AddObject(m, "NetlogonServiceInformation", PyLong_FromLong((uint16_t)(NetlogonServiceInformation)));
	PyModule_AddObject(m, "NetlogonGenericInformation", PyLong_FromLong((uint16_t)(NetlogonGenericInformation)));
	PyModule_AddObject(m, "NetlogonInteractiveTransitiveInformation", PyLong_FromLong((uint16_t)(NetlogonInteractiveTransitiveInformation)));
	PyModule_AddObject(m, "NetlogonNetworkTransitiveInformation", PyLong_FromLong((uint16_t)(NetlogonNetworkTransitiveInformation)));
	PyModule_AddObject(m, "NetlogonServiceTransitiveInformation", PyLong_FromLong((uint16_t)(NetlogonServiceTransitiveInformation)));
	PyModule_AddObject(m, "NetlogonTicketLogonInformation", PyLong_FromLong((uint16_t)(NetlogonTicketLogonInformation)));
	PyModule_AddObject(m, "NETLOGON_GUEST", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_GUEST)));
	PyModule_AddObject(m, "NETLOGON_NOENCRYPTION", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NOENCRYPTION)));
	PyModule_AddObject(m, "NETLOGON_CACHED_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CACHED_ACCOUNT)));
	PyModule_AddObject(m, "NETLOGON_USED_LM_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_USED_LM_PASSWORD)));
	PyModule_AddObject(m, "NETLOGON_EXTRA_SIDS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_EXTRA_SIDS)));
	PyModule_AddObject(m, "NETLOGON_SUBAUTH_SESSION_KEY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SUBAUTH_SESSION_KEY)));
	PyModule_AddObject(m, "NETLOGON_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SERVER_TRUST_ACCOUNT)));
	PyModule_AddObject(m, "NETLOGON_NTLMV2_ENABLED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NTLMV2_ENABLED)));
	PyModule_AddObject(m, "NETLOGON_RESOURCE_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_RESOURCE_GROUPS)));
	PyModule_AddObject(m, "NETLOGON_PROFILE_PATH_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_PROFILE_PATH_RETURNED)));
	PyModule_AddObject(m, "NETLOGON_GRACE_LOGON", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_GRACE_LOGON)));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_CRITICAL_RESULTS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_CRITICAL_RESULTS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_FAILED_LOGON", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_FAILED_LOGON));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_CRITICAL_CLIENT_RESULTS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_CRITICAL_CLIENT_RESULTS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_CRITICAL_COMPUTER_DOMAIN_RESULTS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_CRITICAL_COMPUTER_DOMAIN_RESULTS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_CRITICAL_TRANSIT_RESULTS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_CRITICAL_TRANSIT_RESULTS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SOURCE_INFORMATION", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SOURCE_INFORMATION));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_TICKET_DECRYPTION_FAILED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_TICKET_DECRYPTION_FAILED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_PAC_VALIDATION_FAILED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_PAC_VALIDATION_FAILED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_COMPOUND_SOURCE", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_COMPOUND_SOURCE));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SOURCE_USER_CLAIMS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SOURCE_USER_CLAIMS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_SOURCE_DEVICE_CLAIMS", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_SOURCE_DEVICE_CLAIMS));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_FULL_SIGNATURE_PRESENT", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_FULL_SIGNATURE_PRESENT));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_RESOURCE_GROUPS_REMOVED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_RESOURCE_GROUPS_REMOVED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_TRANSIT_INFORMATION", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_TRANSIT_INFORMATION));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_USER_SIDS_FAILED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_USER_SIDS_FAILED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_USER_NAMESPACE_FAILED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_USER_NAMESPACE_FAILED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_USER_FAILED_A2A", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_USER_FAILED_A2A));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_DEVICE_SIDS_FAILED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_DEVICE_SIDS_FAILED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_DEVICE_NAMESPACE_FAILED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_DEVICE_NAMESPACE_FAILED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_USER_SIDS_FILTERED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_USER_SIDS_FILTERED));
	PyModule_AddObject(m, "NETLOGON_TICKET_LOGON_DEVICE_SIDS_FILTERED", PyLong_FromUnsignedLongLong(NETLOGON_TICKET_LOGON_DEVICE_SIDS_FILTERED));
	PyModule_AddObject(m, "NetlogonValidationUasInfo", PyLong_FromLong((uint16_t)(NetlogonValidationUasInfo)));
	PyModule_AddObject(m, "NetlogonValidationSamInfo", PyLong_FromLong((uint16_t)(NetlogonValidationSamInfo)));
	PyModule_AddObject(m, "NetlogonValidationSamInfo2", PyLong_FromLong((uint16_t)(NetlogonValidationSamInfo2)));
	PyModule_AddObject(m, "NetlogonValidationGenericInfo2", PyLong_FromLong((uint16_t)(NetlogonValidationGenericInfo2)));
	PyModule_AddObject(m, "NetlogonValidationSamInfo4", PyLong_FromLong((uint16_t)(NetlogonValidationSamInfo4)));
	PyModule_AddObject(m, "NetlogonValidationTicketLogon", PyLong_FromLong((uint16_t)(NetlogonValidationTicketLogon)));
	PyModule_AddObject(m, "NETR_DELTA_DOMAIN", PyLong_FromLong((uint16_t)(NETR_DELTA_DOMAIN)));
	PyModule_AddObject(m, "NETR_DELTA_GROUP", PyLong_FromLong((uint16_t)(NETR_DELTA_GROUP)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_GROUP)));
	PyModule_AddObject(m, "NETR_DELTA_RENAME_GROUP", PyLong_FromLong((uint16_t)(NETR_DELTA_RENAME_GROUP)));
	PyModule_AddObject(m, "NETR_DELTA_USER", PyLong_FromLong((uint16_t)(NETR_DELTA_USER)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_USER", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_USER)));
	PyModule_AddObject(m, "NETR_DELTA_RENAME_USER", PyLong_FromLong((uint16_t)(NETR_DELTA_RENAME_USER)));
	PyModule_AddObject(m, "NETR_DELTA_GROUP_MEMBER", PyLong_FromLong((uint16_t)(NETR_DELTA_GROUP_MEMBER)));
	PyModule_AddObject(m, "NETR_DELTA_ALIAS", PyLong_FromLong((uint16_t)(NETR_DELTA_ALIAS)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_ALIAS", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_ALIAS)));
	PyModule_AddObject(m, "NETR_DELTA_RENAME_ALIAS", PyLong_FromLong((uint16_t)(NETR_DELTA_RENAME_ALIAS)));
	PyModule_AddObject(m, "NETR_DELTA_ALIAS_MEMBER", PyLong_FromLong((uint16_t)(NETR_DELTA_ALIAS_MEMBER)));
	PyModule_AddObject(m, "NETR_DELTA_POLICY", PyLong_FromLong((uint16_t)(NETR_DELTA_POLICY)));
	PyModule_AddObject(m, "NETR_DELTA_TRUSTED_DOMAIN", PyLong_FromLong((uint16_t)(NETR_DELTA_TRUSTED_DOMAIN)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_TRUST", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_TRUST)));
	PyModule_AddObject(m, "NETR_DELTA_ACCOUNT", PyLong_FromLong((uint16_t)(NETR_DELTA_ACCOUNT)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_ACCOUNT", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_ACCOUNT)));
	PyModule_AddObject(m, "NETR_DELTA_SECRET", PyLong_FromLong((uint16_t)(NETR_DELTA_SECRET)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_SECRET", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_SECRET)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP2", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_GROUP2)));
	PyModule_AddObject(m, "NETR_DELTA_DELETE_USER2", PyLong_FromLong((uint16_t)(NETR_DELTA_DELETE_USER2)));
	PyModule_AddObject(m, "NETR_DELTA_MODIFY_COUNT", PyLong_FromLong((uint16_t)(NETR_DELTA_MODIFY_COUNT)));
	PyModule_AddObject(m, "NETLOGON_REPLICATION_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_REPLICATION_NEEDED)));
	PyModule_AddObject(m, "NETLOGON_REPLICATION_IN_PROGRESS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_REPLICATION_IN_PROGRESS)));
	PyModule_AddObject(m, "NETLOGON_FULL_SYNC_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_FULL_SYNC_REPLICATION)));
	PyModule_AddObject(m, "NETLOGON_REDO_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_REDO_NEEDED)));
	PyModule_AddObject(m, "NETLOGON_HAS_IP", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_HAS_IP)));
	PyModule_AddObject(m, "NETLOGON_HAS_TIMESERV", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_HAS_TIMESERV)));
	PyModule_AddObject(m, "NETLOGON_DNS_UPDATE_FAILURE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_DNS_UPDATE_FAILURE)));
	PyModule_AddObject(m, "NETLOGON_VERIFY_STATUS_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_VERIFY_STATUS_RETURNED)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_QUERY)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_REPLICATE)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_SYNCHRONIZE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_SYNCHRONIZE)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_PDC_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_PDC_REPLICATE)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_REDISCOVER", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_REDISCOVER)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_TC_QUERY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TC_QUERY)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_TRANSPORT_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TRANSPORT_NOTIFY)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_FIND_USER", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_FIND_USER)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_CHANGE_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_CHANGE_PASSWORD)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_TC_VERIFY", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TC_VERIFY)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_FORCE_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_FORCE_DNS_REG)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_QUERY_DNS_REG)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_BACKUP_CHANGE_LOG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_BACKUP_CHANGE_LOG)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_TRUNCATE_LOG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_TRUNCATE_LOG)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_SET_DBFLAG", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_SET_DBFLAG)));
	PyModule_AddObject(m, "NETLOGON_CONTROL_BREAKPOINT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_CONTROL_BREAKPOINT)));
	PyModule_AddObject(m, "NETLOGON_NEG_ACCOUNT_LOCKOUT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_ACCOUNT_LOCKOUT)));
	PyModule_AddObject(m, "NETLOGON_NEG_PERSISTENT_SAMREPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PERSISTENT_SAMREPL)));
	PyModule_AddObject(m, "NETLOGON_NEG_ARCFOUR", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_ARCFOUR)));
	PyModule_AddObject(m, "NETLOGON_NEG_PROMOTION_COUNT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PROMOTION_COUNT)));
	PyModule_AddObject(m, "NETLOGON_NEG_CHANGELOG_BDC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_CHANGELOG_BDC)));
	PyModule_AddObject(m, "NETLOGON_NEG_FULL_SYNC_REPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_FULL_SYNC_REPL)));
	PyModule_AddObject(m, "NETLOGON_NEG_MULTIPLE_SIDS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_MULTIPLE_SIDS)));
	PyModule_AddObject(m, "NETLOGON_NEG_REDO", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_REDO)));
	PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL)));
	PyModule_AddObject(m, "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_SEND_PASSWORD_INFO_PDC)));
	PyModule_AddObject(m, "NETLOGON_NEG_GENERIC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_GENERIC_PASSTHROUGH)));
	PyModule_AddObject(m, "NETLOGON_NEG_CONCURRENT_RPC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_CONCURRENT_RPC)));
	PyModule_AddObject(m, "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL)));
	PyModule_AddObject(m, "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL)));
	PyModule_AddObject(m, "NETLOGON_NEG_STRONG_KEYS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_STRONG_KEYS)));
	PyModule_AddObject(m, "NETLOGON_NEG_TRANSITIVE_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_TRANSITIVE_TRUSTS)));
	PyModule_AddObject(m, "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_DNS_DOMAIN_TRUSTS)));
	PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_SET2", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_PASSWORD_SET2)));
	PyModule_AddObject(m, "NETLOGON_NEG_GETDOMAININFO", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_GETDOMAININFO)));
	PyModule_AddObject(m, "NETLOGON_NEG_CROSS_FOREST_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_CROSS_FOREST_TRUSTS)));
	PyModule_AddObject(m, "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION)));
	PyModule_AddObject(m, "NETLOGON_NEG_RODC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_RODC_PASSTHROUGH)));
	PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES_SHA2", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_SUPPORTS_AES_SHA2)));
	PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_SUPPORTS_AES)));
	PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AUTHENTICATED_RPC_LSASS)));
	PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_AUTHENTICATED_RPC)));
	PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_KERBEROS_AUTH", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_NEG_SUPPORTS_KERBEROS_AUTH)));
	PyModule_AddObject(m, "SYNCSTATE_NORMAL_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_NORMAL_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_DOMAIN_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_DOMAIN_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_GROUP_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_GROUP_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_UAS_BUILT_IN_GROUP_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_USER_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_USER_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_GROUP_MEMBER_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_GROUP_MEMBER_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_ALIAS_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_ALIAS_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_ALIAS_MEMBER_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_ALIAS_MEMBER_STATE)));
	PyModule_AddObject(m, "SYNCSTATE_SAM_DONE_STATE", PyLong_FromLong((uint16_t)(SYNCSTATE_SAM_DONE_STATE)));
	PyModule_AddObject(m, "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED)));
	PyModule_AddObject(m, "NETR_CHANGELOG_CHANGED_PASSWORD", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_CHANGED_PASSWORD)));
	PyModule_AddObject(m, "NETR_CHANGELOG_SID_INCLUDED", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_SID_INCLUDED)));
	PyModule_AddObject(m, "NETR_CHANGELOG_NAME_INCLUDED", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_NAME_INCLUDED)));
	PyModule_AddObject(m, "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", PyLong_FromLong((uint16_t)(NETR_CHANGELOG_FIRST_PROMOTION_OBJ)));
	PyModule_AddObject(m, "DS_FORCE_REDISCOVERY", PyLong_FromUnsignedLongLong((uint32_t)(DS_FORCE_REDISCOVERY)));
	PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_REQUIRED)));
	PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_PREFERRED)));
	PyModule_AddObject(m, "DS_GC_SERVER_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_GC_SERVER_REQUIRED)));
	PyModule_AddObject(m, "DS_PDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_PDC_REQUIRED)));
	PyModule_AddObject(m, "DS_BACKGROUND_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DS_BACKGROUND_ONLY)));
	PyModule_AddObject(m, "DS_IP_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_IP_REQUIRED)));
	PyModule_AddObject(m, "DS_KDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_KDC_REQUIRED)));
	PyModule_AddObject(m, "DS_TIMESERV_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_TIMESERV_REQUIRED)));
	PyModule_AddObject(m, "DS_WRITABLE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_WRITABLE_REQUIRED)));
	PyModule_AddObject(m, "DS_GOOD_TIMESERV_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_GOOD_TIMESERV_PREFERRED)));
	PyModule_AddObject(m, "DS_AVOID_SELF", PyLong_FromUnsignedLongLong((uint32_t)(DS_AVOID_SELF)));
	PyModule_AddObject(m, "DS_ONLY_LDAP_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)(DS_ONLY_LDAP_NEEDED)));
	PyModule_AddObject(m, "DS_IS_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_IS_FLAT_NAME)));
	PyModule_AddObject(m, "DS_IS_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_IS_DNS_NAME)));
	PyModule_AddObject(m, "DS_TRY_NEXTCLOSEST_SITE", PyLong_FromUnsignedLongLong((uint32_t)(DS_TRY_NEXTCLOSEST_SITE)));
	PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_6_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_6_REQUIRED)));
	PyModule_AddObject(m, "DS_WEB_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_WEB_SERVICE_REQUIRED)));
	PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_8_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_8_REQUIRED)));
	PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_9_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_9_REQUIRED)));
	PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_10_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)(DS_DIRECTORY_SERVICE_10_REQUIRED)));
	PyModule_AddObject(m, "DS_RETURN_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_RETURN_DNS_NAME)));
	PyModule_AddObject(m, "DS_RETURN_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DS_RETURN_FLAT_NAME)));
	PyModule_AddObject(m, "DS_ADDRESS_TYPE_INET", PyLong_FromUnsignedLongLong((uint32_t)(DS_ADDRESS_TYPE_INET)));
	PyModule_AddObject(m, "DS_ADDRESS_TYPE_NETBIOS", PyLong_FromUnsignedLongLong((uint32_t)(DS_ADDRESS_TYPE_NETBIOS)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_IN_FOREST", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_IN_FOREST)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_OUTBOUND", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_OUTBOUND)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_TREEROOT", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_TREEROOT)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_PRIMARY", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_PRIMARY)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_NATIVE", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_NATIVE)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_INBOUND", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_INBOUND)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_MIT_KRB5", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_MIT_KRB5)));
	PyModule_AddObject(m, "NETR_TRUST_FLAG_AES", PyLong_FromUnsignedLongLong((uint32_t)(NETR_TRUST_FLAG_AES)));
	PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)(NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS)));
	PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_SPN_UPDATE", PyLong_FromUnsignedLongLong((uint32_t)(NETR_WS_FLAG_HANDLES_SPN_UPDATE)));
	PyModule_AddObject(m, "NETR_VER_SUITE_BACKOFFICE", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_BACKOFFICE)));
	PyModule_AddObject(m, "NETR_VER_SUITE_BLADE", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_BLADE)));
	PyModule_AddObject(m, "NETR_VER_SUITE_COMPUTE_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_COMPUTE_SERVER)));
	PyModule_AddObject(m, "NETR_VER_SUITE_DATACENTER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_DATACENTER)));
	PyModule_AddObject(m, "NETR_VER_SUITE_ENTERPRISE", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_ENTERPRISE)));
	PyModule_AddObject(m, "NETR_VER_SUITE_EMBEDDEDNT", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_EMBEDDEDNT)));
	PyModule_AddObject(m, "NETR_VER_SUITE_PERSONAL", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_PERSONAL)));
	PyModule_AddObject(m, "NETR_VER_SUITE_SINGLEUSERTS", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_SINGLEUSERTS)));
	PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_SMALLBUSINESS)));
	PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED)));
	PyModule_AddObject(m, "NETR_VER_SUITE_STORAGE_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_STORAGE_SERVER)));
	PyModule_AddObject(m, "NETR_VER_SUITE_TERMINAL", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_TERMINAL)));
	PyModule_AddObject(m, "NETR_VER_SUITE_WH_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_SUITE_WH_SERVER)));
	PyModule_AddObject(m, "NETR_VER_NT_DOMAIN_CONTROLLER", PyLong_FromLong((uint16_t)(NETR_VER_NT_DOMAIN_CONTROLLER)));
	PyModule_AddObject(m, "NETR_VER_NT_SERVER", PyLong_FromLong((uint16_t)(NETR_VER_NT_SERVER)));
	PyModule_AddObject(m, "NETR_VER_NT_WORKSTATION", PyLong_FromLong((uint16_t)(NETR_VER_NT_WORKSTATION)));
	PyModule_AddObject(m, "SendToSamUpdatePassword", PyLong_FromLong((uint16_t)(SendToSamUpdatePassword)));
	PyModule_AddObject(m, "SendToSamResetBadPasswordCount", PyLong_FromLong((uint16_t)(SendToSamResetBadPasswordCount)));
	PyModule_AddObject(m, "SendToSamUpdatePasswordForward", PyLong_FromLong((uint16_t)(SendToSamUpdatePasswordForward)));
	PyModule_AddObject(m, "SendToSamUpdateLastLogonTimestamp", PyLong_FromLong((uint16_t)(SendToSamUpdateLastLogonTimestamp)));
	PyModule_AddObject(m, "SendToSamResetSmartCardPassword", PyLong_FromLong((uint16_t)(SendToSamResetSmartCardPassword)));
	PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT)));
	PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP)));
	PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN)));
	PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST", PyLong_FromUnsignedLongLong((uint32_t)(NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST)));
	PyModule_AddObject(m, "NlDnsLdapAtSite", PyLong_FromLong((uint16_t)(NlDnsLdapAtSite)));
	PyModule_AddObject(m, "NlDnsGcAtSite", PyLong_FromLong((uint16_t)(NlDnsGcAtSite)));
	PyModule_AddObject(m, "NlDnsDsaCname", PyLong_FromLong((uint16_t)(NlDnsDsaCname)));
	PyModule_AddObject(m, "NlDnsKdcAtSite", PyLong_FromLong((uint16_t)(NlDnsKdcAtSite)));
	PyModule_AddObject(m, "NlDnsDcAtSite", PyLong_FromLong((uint16_t)(NlDnsDcAtSite)));
	PyModule_AddObject(m, "NlDnsRfc1510KdcAtSite", PyLong_FromLong((uint16_t)(NlDnsRfc1510KdcAtSite)));
	PyModule_AddObject(m, "NlDnsGenericGcAtSite", PyLong_FromLong((uint16_t)(NlDnsGenericGcAtSite)));
	PyModule_AddObject(m, "NlDnsInfoTypeNone", PyLong_FromLong((uint16_t)(NlDnsInfoTypeNone)));
	PyModule_AddObject(m, "NlDnsDomainName", PyLong_FromLong((uint16_t)(NlDnsDomainName)));
	PyModule_AddObject(m, "NlDnsDomainNameAlias", PyLong_FromLong((uint16_t)(NlDnsDomainNameAlias)));
	PyModule_AddObject(m, "NlDnsForestName", PyLong_FromLong((uint16_t)(NlDnsForestName)));
	PyModule_AddObject(m, "NlDnsForestNameAlias", PyLong_FromLong((uint16_t)(NlDnsForestNameAlias)));
	PyModule_AddObject(m, "NlDnsNdncDomainName", PyLong_FromLong((uint16_t)(NlDnsNdncDomainName)));
	PyModule_AddObject(m, "NlDnsRecordName", PyLong_FromLong((uint16_t)(NlDnsRecordName)));
	Py_INCREF((PyObject *)(void *)&netr_UasInfo_Type);
	PyModule_AddObject(m, "netr_UasInfo", (PyObject *)(void *)&netr_UasInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_UasLogoffInfo_Type);
	PyModule_AddObject(m, "netr_UasLogoffInfo", (PyObject *)(void *)&netr_UasLogoffInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_AcctLockStr_Type);
	PyModule_AddObject(m, "netr_AcctLockStr", (PyObject *)(void *)&netr_AcctLockStr_Type);
	Py_INCREF((PyObject *)(void *)&netr_IdentityInfo_Type);
	PyModule_AddObject(m, "netr_IdentityInfo", (PyObject *)(void *)&netr_IdentityInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_PasswordInfo_Type);
	PyModule_AddObject(m, "netr_PasswordInfo", (PyObject *)(void *)&netr_PasswordInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_ChallengeResponse_Type);
	PyModule_AddObject(m, "netr_ChallengeResponse", (PyObject *)(void *)&netr_ChallengeResponse_Type);
	Py_INCREF((PyObject *)(void *)&netr_NetworkInfo_Type);
	PyModule_AddObject(m, "netr_NetworkInfo", (PyObject *)(void *)&netr_NetworkInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_GenericInfo_Type);
	PyModule_AddObject(m, "netr_GenericInfo", (PyObject *)(void *)&netr_GenericInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_TicketLogonInfo_Type);
	PyModule_AddObject(m, "netr_TicketLogonInfo", (PyObject *)(void *)&netr_TicketLogonInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonLevel_Type);
	PyModule_AddObject(m, "netr_LogonLevel", (PyObject *)(void *)&netr_LogonLevel_Type);
	Py_INCREF((PyObject *)(void *)&netr_UserSessionKey_Type);
	PyModule_AddObject(m, "netr_UserSessionKey", (PyObject *)(void *)&netr_UserSessionKey_Type);
	Py_INCREF((PyObject *)(void *)&netr_LMSessionKey_Type);
	PyModule_AddObject(m, "netr_LMSessionKey", (PyObject *)(void *)&netr_LMSessionKey_Type);
	Py_INCREF((PyObject *)(void *)&netr_SamBaseInfo_Type);
	PyModule_AddObject(m, "netr_SamBaseInfo", (PyObject *)(void *)&netr_SamBaseInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_SamInfo2_Type);
	PyModule_AddObject(m, "netr_SamInfo2", (PyObject *)(void *)&netr_SamInfo2_Type);
	Py_INCREF((PyObject *)(void *)&netr_SidAttr_Type);
	PyModule_AddObject(m, "netr_SidAttr", (PyObject *)(void *)&netr_SidAttr_Type);
	Py_INCREF((PyObject *)(void *)&netr_SamInfo3_Type);
	PyModule_AddObject(m, "netr_SamInfo3", (PyObject *)(void *)&netr_SamInfo3_Type);
	Py_INCREF((PyObject *)(void *)&netr_SamInfo6_Type);
	PyModule_AddObject(m, "netr_SamInfo6", (PyObject *)(void *)&netr_SamInfo6_Type);
	Py_INCREF((PyObject *)(void *)&netr_PacInfo_Type);
	PyModule_AddObject(m, "netr_PacInfo", (PyObject *)(void *)&netr_PacInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_GenericInfo2_Type);
	PyModule_AddObject(m, "netr_GenericInfo2", (PyObject *)(void *)&netr_GenericInfo2_Type);
	Py_INCREF((PyObject *)(void *)&netr_ValidationTicketLogon_Type);
	PyModule_AddObject(m, "netr_ValidationTicketLogon", (PyObject *)(void *)&netr_ValidationTicketLogon_Type);
	Py_INCREF((PyObject *)(void *)&netr_Validation_Type);
	PyModule_AddObject(m, "netr_Validation", (PyObject *)(void *)&netr_Validation_Type);
	Py_INCREF((PyObject *)(void *)&netr_Credential_Type);
	PyModule_AddObject(m, "netr_Credential", (PyObject *)(void *)&netr_Credential_Type);
	Py_INCREF((PyObject *)(void *)&netlogon_server_pipe_state_Type);
	PyModule_AddObject(m, "server_pipe_state", (PyObject *)(void *)&netlogon_server_pipe_state_Type);
	Py_INCREF((PyObject *)(void *)&netr_Authenticator_Type);
	PyModule_AddObject(m, "netr_Authenticator", (PyObject *)(void *)&netr_Authenticator_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
	PyModule_AddObject(m, "netr_DELTA_DELETE_USER", (PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
	Py_INCREF((PyObject *)(void *)&netr_USER_KEY16_Type);
	PyModule_AddObject(m, "netr_USER_KEY16", (PyObject *)(void *)&netr_USER_KEY16_Type);
	Py_INCREF((PyObject *)(void *)&netr_PasswordHistory_Type);
	PyModule_AddObject(m, "netr_PasswordHistory", (PyObject *)(void *)&netr_PasswordHistory_Type);
	Py_INCREF((PyObject *)(void *)&netr_USER_KEYS2_Type);
	PyModule_AddObject(m, "netr_USER_KEYS2", (PyObject *)(void *)&netr_USER_KEYS2_Type);
	Py_INCREF((PyObject *)(void *)&netr_USER_KEY_UNION_Type);
	PyModule_AddObject(m, "netr_USER_KEY_UNION", (PyObject *)(void *)&netr_USER_KEY_UNION_Type);
	Py_INCREF((PyObject *)(void *)&netr_USER_KEYS_Type);
	PyModule_AddObject(m, "netr_USER_KEYS", (PyObject *)(void *)&netr_USER_KEYS_Type);
	Py_INCREF((PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
	PyModule_AddObject(m, "netr_USER_PRIVATE_INFO", (PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_USER_Type);
	PyModule_AddObject(m, "netr_DELTA_USER", (PyObject *)(void *)&netr_DELTA_USER_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
	PyModule_AddObject(m, "netr_DELTA_DOMAIN", (PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_Type);
	PyModule_AddObject(m, "netr_DELTA_GROUP", (PyObject *)(void *)&netr_DELTA_GROUP_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_RENAME_Type);
	PyModule_AddObject(m, "netr_DELTA_RENAME", (PyObject *)(void *)&netr_DELTA_RENAME_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
	PyModule_AddObject(m, "netr_DELTA_GROUP_MEMBER", (PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_Type);
	PyModule_AddObject(m, "netr_DELTA_ALIAS", (PyObject *)(void *)&netr_DELTA_ALIAS_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
	PyModule_AddObject(m, "netr_DELTA_ALIAS_MEMBER", (PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
	Py_INCREF((PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
	PyModule_AddObject(m, "netr_QUOTA_LIMITS", (PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_POLICY_Type);
	PyModule_AddObject(m, "netr_DELTA_POLICY", (PyObject *)(void *)&netr_DELTA_POLICY_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
	PyModule_AddObject(m, "netr_DELTA_TRUSTED_DOMAIN", (PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
	PyModule_AddObject(m, "netr_DELTA_ACCOUNT", (PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
	Py_INCREF((PyObject *)(void *)&netr_CIPHER_VALUE_Type);
	PyModule_AddObject(m, "netr_CIPHER_VALUE", (PyObject *)(void *)&netr_CIPHER_VALUE_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_SECRET_Type);
	PyModule_AddObject(m, "netr_DELTA_SECRET", (PyObject *)(void *)&netr_DELTA_SECRET_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_UNION_Type);
	PyModule_AddObject(m, "netr_DELTA_UNION", (PyObject *)(void *)&netr_DELTA_UNION_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
	PyModule_AddObject(m, "netr_DELTA_ID_UNION", (PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_Type);
	PyModule_AddObject(m, "netr_DELTA_ENUM", (PyObject *)(void *)&netr_DELTA_ENUM_Type);
	Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
	PyModule_AddObject(m, "netr_DELTA_ENUM_ARRAY", (PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
	Py_INCREF((PyObject *)(void *)&netr_UAS_INFO_0_Type);
	PyModule_AddObject(m, "netr_UAS_INFO_0", (PyObject *)(void *)&netr_UAS_INFO_0_Type);
	Py_INCREF((PyObject *)(void *)&netr_AccountBuffer_Type);
	PyModule_AddObject(m, "netr_AccountBuffer", (PyObject *)(void *)&netr_AccountBuffer_Type);
	Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
	PyModule_AddObject(m, "netr_NETLOGON_INFO_1", (PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
	Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
	PyModule_AddObject(m, "netr_NETLOGON_INFO_2", (PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
	Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
	PyModule_AddObject(m, "netr_NETLOGON_INFO_3", (PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
	Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
	PyModule_AddObject(m, "netr_NETLOGON_INFO_4", (PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
	Py_INCREF((PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
	PyModule_AddObject(m, "netr_CONTROL_QUERY_INFORMATION", (PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
	Py_INCREF((PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
	PyModule_AddObject(m, "netr_CONTROL_DATA_INFORMATION", (PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
	Py_INCREF((PyObject *)(void *)&netr_ChangeLogObject_Type);
	PyModule_AddObject(m, "netr_ChangeLogObject", (PyObject *)(void *)&netr_ChangeLogObject_Type);
	Py_INCREF((PyObject *)(void *)&netr_ChangeLogEntry_Type);
	PyModule_AddObject(m, "netr_ChangeLogEntry", (PyObject *)(void *)&netr_ChangeLogEntry_Type);
	Py_INCREF((PyObject *)(void *)&netr_Blob_Type);
	PyModule_AddObject(m, "netr_Blob", (PyObject *)(void *)&netr_Blob_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
	PyModule_AddObject(m, "netr_DsRGetDCNameInfo", (PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_Capabilities_Type);
	PyModule_AddObject(m, "netr_Capabilities", (PyObject *)(void *)&netr_Capabilities_Type);
	Py_INCREF((PyObject *)(void *)&netr_LsaPolicyInformation_Type);
	PyModule_AddObject(m, "netr_LsaPolicyInformation", (PyObject *)(void *)&netr_LsaPolicyInformation_Type);
	Py_INCREF((PyObject *)(void *)&netr_OsVersionInfoEx_Type);
	PyModule_AddObject(m, "netr_OsVersionInfoEx", (PyObject *)(void *)&netr_OsVersionInfoEx_Type);
	Py_INCREF((PyObject *)(void *)&netr_OsVersion_Type);
	PyModule_AddObject(m, "netr_OsVersion", (PyObject *)(void *)&netr_OsVersion_Type);
	Py_INCREF((PyObject *)(void *)&netr_OsVersionContainer_Type);
	PyModule_AddObject(m, "netr_OsVersionContainer", (PyObject *)(void *)&netr_OsVersionContainer_Type);
	Py_INCREF((PyObject *)(void *)&netr_WorkstationInformation_Type);
	PyModule_AddObject(m, "netr_WorkstationInformation", (PyObject *)(void *)&netr_WorkstationInformation_Type);
	Py_INCREF((PyObject *)(void *)&netr_WorkstationInfo_Type);
	PyModule_AddObject(m, "netr_WorkstationInfo", (PyObject *)(void *)&netr_WorkstationInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_trust_extension_info_Type);
	PyModule_AddObject(m, "netr_trust_extension_info", (PyObject *)(void *)&netr_trust_extension_info_Type);
	Py_INCREF((PyObject *)(void *)&netr_trust_extension_Type);
	PyModule_AddObject(m, "netr_trust_extension", (PyObject *)(void *)&netr_trust_extension_Type);
	Py_INCREF((PyObject *)(void *)&netr_trust_extension_container_Type);
	PyModule_AddObject(m, "netr_trust_extension_container", (PyObject *)(void *)&netr_trust_extension_container_Type);
	Py_INCREF((PyObject *)(void *)&netr_OneDomainInfo_Type);
	PyModule_AddObject(m, "netr_OneDomainInfo", (PyObject *)(void *)&netr_OneDomainInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_DomainInformation_Type);
	PyModule_AddObject(m, "netr_DomainInformation", (PyObject *)(void *)&netr_DomainInformation_Type);
	Py_INCREF((PyObject *)(void *)&netr_DomainInfo_Type);
	PyModule_AddObject(m, "netr_DomainInfo", (PyObject *)(void *)&netr_DomainInfo_Type);
	Py_INCREF((PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
	PyModule_AddObject(m, "NL_PASSWORD_VERSION", (PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
	Py_INCREF((PyObject *)(void *)&netr_CryptPassword_Type);
	PyModule_AddObject(m, "netr_CryptPassword", (PyObject *)(void *)&netr_CryptPassword_Type);
	Py_INCREF((PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
	PyModule_AddObject(m, "netr_SendToSamResetBadPasswordCount", (PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
	Py_INCREF((PyObject *)(void *)&netr_SendToSamMessage_Type);
	PyModule_AddObject(m, "netr_SendToSamMessage", (PyObject *)(void *)&netr_SendToSamMessage_Type);
	Py_INCREF((PyObject *)(void *)&netr_SendToSamBase_Type);
	PyModule_AddObject(m, "netr_SendToSamBase", (PyObject *)(void *)&netr_SendToSamBase_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
	PyModule_AddObject(m, "netr_DsRAddressToSitenamesWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRAddress_Type);
	PyModule_AddObject(m, "netr_DsRAddress", (PyObject *)(void *)&netr_DsRAddress_Type);
	Py_INCREF((PyObject *)(void *)&netr_DomainTrust_Type);
	PyModule_AddObject(m, "netr_DomainTrust", (PyObject *)(void *)&netr_DomainTrust_Type);
	Py_INCREF((PyObject *)(void *)&netr_DomainTrustList_Type);
	PyModule_AddObject(m, "netr_DomainTrustList", (PyObject *)(void *)&netr_DomainTrustList_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
	PyModule_AddObject(m, "netr_DsRAddressToSitenamesExWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
	Py_INCREF((PyObject *)(void *)&DcSitesCtr_Type);
	PyModule_AddObject(m, "DcSitesCtr", (PyObject *)(void *)&DcSitesCtr_Type);
	Py_INCREF((PyObject *)(void *)&netr_TrustInfo_Type);
	PyModule_AddObject(m, "netr_TrustInfo", (PyObject *)(void *)&netr_TrustInfo_Type);
	Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
	PyModule_AddObject(m, "NL_DNS_NAME_INFO", (PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
	Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
	PyModule_AddObject(m, "NL_DNS_NAME_INFO_ARRAY", (PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonUasLogon_Type);
	PyModule_AddObject(m, "netr_LogonUasLogon", (PyObject *)(void *)&netr_LogonUasLogon_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonUasLogoff_Type);
	PyModule_AddObject(m, "netr_LogonUasLogoff", (PyObject *)(void *)&netr_LogonUasLogoff_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonSamLogon_Type);
	PyModule_AddObject(m, "netr_LogonSamLogon", (PyObject *)(void *)&netr_LogonSamLogon_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonSamLogoff_Type);
	PyModule_AddObject(m, "netr_LogonSamLogoff", (PyObject *)(void *)&netr_LogonSamLogoff_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerReqChallenge_Type);
	PyModule_AddObject(m, "netr_ServerReqChallenge", (PyObject *)(void *)&netr_ServerReqChallenge_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate_Type);
	PyModule_AddObject(m, "netr_ServerAuthenticate", (PyObject *)(void *)&netr_ServerAuthenticate_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet_Type);
	PyModule_AddObject(m, "netr_ServerPasswordSet", (PyObject *)(void *)&netr_ServerPasswordSet_Type);
	Py_INCREF((PyObject *)(void *)&netr_DatabaseDeltas_Type);
	PyModule_AddObject(m, "netr_DatabaseDeltas", (PyObject *)(void *)&netr_DatabaseDeltas_Type);
	Py_INCREF((PyObject *)(void *)&netr_DatabaseSync_Type);
	PyModule_AddObject(m, "netr_DatabaseSync", (PyObject *)(void *)&netr_DatabaseSync_Type);
	Py_INCREF((PyObject *)(void *)&netr_AccountDeltas_Type);
	PyModule_AddObject(m, "netr_AccountDeltas", (PyObject *)(void *)&netr_AccountDeltas_Type);
	Py_INCREF((PyObject *)(void *)&netr_AccountSync_Type);
	PyModule_AddObject(m, "netr_AccountSync", (PyObject *)(void *)&netr_AccountSync_Type);
	Py_INCREF((PyObject *)(void *)&netr_GetDcName_Type);
	PyModule_AddObject(m, "netr_GetDcName", (PyObject *)(void *)&netr_GetDcName_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonControl_Type);
	PyModule_AddObject(m, "netr_LogonControl", (PyObject *)(void *)&netr_LogonControl_Type);
	Py_INCREF((PyObject *)(void *)&netr_GetAnyDCName_Type);
	PyModule_AddObject(m, "netr_GetAnyDCName", (PyObject *)(void *)&netr_GetAnyDCName_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonControl2_Type);
	PyModule_AddObject(m, "netr_LogonControl2", (PyObject *)(void *)&netr_LogonControl2_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate2_Type);
	PyModule_AddObject(m, "netr_ServerAuthenticate2", (PyObject *)(void *)&netr_ServerAuthenticate2_Type);
	Py_INCREF((PyObject *)(void *)&netr_DatabaseSync2_Type);
	PyModule_AddObject(m, "netr_DatabaseSync2", (PyObject *)(void *)&netr_DatabaseSync2_Type);
	Py_INCREF((PyObject *)(void *)&netr_DatabaseRedo_Type);
	PyModule_AddObject(m, "netr_DatabaseRedo", (PyObject *)(void *)&netr_DatabaseRedo_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonControl2Ex_Type);
	PyModule_AddObject(m, "netr_LogonControl2Ex", (PyObject *)(void *)&netr_LogonControl2Ex_Type);
	Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
	PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomains", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRGetDCName_Type);
	PyModule_AddObject(m, "netr_DsRGetDCName", (PyObject *)(void *)&netr_DsRGetDCName_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonGetCapabilities_Type);
	PyModule_AddObject(m, "netr_LogonGetCapabilities", (PyObject *)(void *)&netr_LogonGetCapabilities_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonGetTrustRid_Type);
	PyModule_AddObject(m, "netr_LogonGetTrustRid", (PyObject *)(void *)&netr_LogonGetTrustRid_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate3_Type);
	PyModule_AddObject(m, "netr_ServerAuthenticate3", (PyObject *)(void *)&netr_ServerAuthenticate3_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
	PyModule_AddObject(m, "netr_DsRGetDCNameEx", (PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRGetSiteName_Type);
	PyModule_AddObject(m, "netr_DsRGetSiteName", (PyObject *)(void *)&netr_DsRGetSiteName_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
	PyModule_AddObject(m, "netr_LogonGetDomainInfo", (PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet2_Type);
	PyModule_AddObject(m, "netr_ServerPasswordSet2", (PyObject *)(void *)&netr_ServerPasswordSet2_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerPasswordGet_Type);
	PyModule_AddObject(m, "netr_ServerPasswordGet", (PyObject *)(void *)&netr_ServerPasswordGet_Type);
	Py_INCREF((PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
	PyModule_AddObject(m, "netr_NetrLogonSendToSam", (PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
	PyModule_AddObject(m, "netr_DsRAddressToSitenamesW", (PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
	PyModule_AddObject(m, "netr_DsRGetDCNameEx2", (PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
	Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
	PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomainsEx", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
	PyModule_AddObject(m, "netr_DsRAddressToSitenamesExW", (PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
	PyModule_AddObject(m, "netr_DsrGetDcSiteCoverageW", (PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonEx_Type);
	PyModule_AddObject(m, "netr_LogonSamLogonEx", (PyObject *)(void *)&netr_LogonSamLogonEx_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
	PyModule_AddObject(m, "netr_DsrEnumerateDomainTrusts", (PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
	PyModule_AddObject(m, "netr_DsrDeregisterDNSHostRecords", (PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
	PyModule_AddObject(m, "netr_ServerTrustPasswordsGet", (PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
	PyModule_AddObject(m, "netr_DsRGetForestTrustInformation", (PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
	Py_INCREF((PyObject *)(void *)&netr_GetForestTrustInformation_Type);
	PyModule_AddObject(m, "netr_GetForestTrustInformation", (PyObject *)(void *)&netr_GetForestTrustInformation_Type);
	Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
	PyModule_AddObject(m, "netr_LogonSamLogonWithFlags", (PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
	PyModule_AddObject(m, "netr_ServerGetTrustInfo", (PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
	Py_INCREF((PyObject *)(void *)&netr_Unused47_Type);
	PyModule_AddObject(m, "netr_Unused47", (PyObject *)(void *)&netr_Unused47_Type);
	Py_INCREF((PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
	PyModule_AddObject(m, "netr_DsrUpdateReadOnlyServerDnsRecords", (PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
	Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticateKerberos_Type);
	PyModule_AddObject(m, "netr_ServerAuthenticateKerberos", (PyObject *)(void *)&netr_ServerAuthenticateKerberos_Type);
	Py_INCREF((PyObject *)(void *)&netlogon_InterfaceType);
	PyModule_AddObject(m, "netlogon", (PyObject *)(void *)&netlogon_InterfaceType);
	Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
	PyModule_AddObject(m, "netlogon_abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
	Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
	PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
#ifdef PY_MOD_NETLOGON_PATCH
	PY_MOD_NETLOGON_PATCH(m);
#endif
	out:
	Py_XDECREF(dep_samba_dcerpc_misc);
	Py_XDECREF(dep_samba_dcerpc_lsa);
	Py_XDECREF(dep_samba_dcerpc_samr);
	Py_XDECREF(dep_samba_dcerpc_security);
	Py_XDECREF(dep_samba_dcerpc_nbt);
	Py_XDECREF(dep_talloc);
	Py_XDECREF(dep_samba_dcerpc_base);
	return m;

}
