LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_netlogon.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 2131 32769 6.5 %
Date: 2021-09-23 10:06:22 Functions: 92 2345 3.9 %

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include <Python.h>
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_netlogon.h"
      12             : #include "bin/default/librpc/gen_ndr/ndr_netlogon_c.h"
      13             : 
      14             : /*
      15             :  * Suppress compiler warnings if the generated code does not call these
      16             :  * functions
      17             :  */
      18             : #ifndef _MAYBE_UNUSED_
      19             : #ifdef __has_attribute
      20             : #if __has_attribute(unused)
      21             : #define _MAYBE_UNUSED_ __attribute__ ((unused))
      22             : #else
      23             : #define _MAYBE_UNUSED_
      24             : #endif
      25             : #endif
      26             : #endif
      27             : /*
      28             :  * These functions are here to ensure they can be optimized out by
      29             :  * the compiler based on the constant input values
      30             :  */
      31             : 
      32        4415 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34        4415 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37         721 :         case 4:
      38         721 :                 return UINT32_MAX;
      39          38 :         case 2:
      40          38 :                 return UINT16_MAX;
      41        3656 :         case 1:
      42        3656 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48          19 : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50          19 :         switch (var_size) {
      51          19 :         case 8:
      52          19 :                 return INT64_MAX;
      53           0 :         case 4:
      54           0 :                 return INT32_MAX;
      55           0 :         case 2:
      56           0 :                 return INT16_MAX;
      57           0 :         case 1:
      58           0 :                 return INT8_MAX;
      59             :         }
      60             : 
      61           0 :         return 0;
      62             : }
      63             : 
      64             : #include "librpc/gen_ndr/misc.h"
      65             : #include "librpc/gen_ndr/lsa.h"
      66             : #include "librpc/gen_ndr/samr.h"
      67             : #include "librpc/gen_ndr/security.h"
      68             : static PyTypeObject netr_UasInfo_Type;
      69             : static PyTypeObject netr_UasLogoffInfo_Type;
      70             : static PyTypeObject netr_AcctLockStr_Type;
      71             : static PyTypeObject netr_IdentityInfo_Type;
      72             : static PyTypeObject netr_PasswordInfo_Type;
      73             : static PyTypeObject netr_ChallengeResponse_Type;
      74             : static PyTypeObject netr_NetworkInfo_Type;
      75             : static PyTypeObject netr_GenericInfo_Type;
      76             : static PyTypeObject netr_LogonLevel_Type;
      77             : static PyTypeObject netr_UserSessionKey_Type;
      78             : static PyTypeObject netr_LMSessionKey_Type;
      79             : static PyTypeObject netr_SamBaseInfo_Type;
      80             : static PyTypeObject netr_SamInfo2_Type;
      81             : static PyTypeObject netr_SidAttr_Type;
      82             : static PyTypeObject netr_SamInfo3_Type;
      83             : static PyTypeObject netr_SamInfo6_Type;
      84             : static PyTypeObject netr_PacInfo_Type;
      85             : static PyTypeObject netr_GenericInfo2_Type;
      86             : static PyTypeObject netr_Validation_Type;
      87             : static PyTypeObject netr_Credential_Type;
      88             : static PyTypeObject netr_Authenticator_Type;
      89             : static PyTypeObject netr_DELTA_DELETE_USER_Type;
      90             : static PyTypeObject netr_USER_KEY16_Type;
      91             : static PyTypeObject netr_PasswordHistory_Type;
      92             : static PyTypeObject netr_USER_KEYS2_Type;
      93             : static PyTypeObject netr_USER_KEY_UNION_Type;
      94             : static PyTypeObject netr_USER_KEYS_Type;
      95             : static PyTypeObject netr_USER_PRIVATE_INFO_Type;
      96             : static PyTypeObject netr_DELTA_USER_Type;
      97             : static PyTypeObject netr_DELTA_DOMAIN_Type;
      98             : static PyTypeObject netr_DELTA_GROUP_Type;
      99             : static PyTypeObject netr_DELTA_RENAME_Type;
     100             : static PyTypeObject netr_DELTA_GROUP_MEMBER_Type;
     101             : static PyTypeObject netr_DELTA_ALIAS_Type;
     102             : static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type;
     103             : static PyTypeObject netr_QUOTA_LIMITS_Type;
     104             : static PyTypeObject netr_DELTA_POLICY_Type;
     105             : static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type;
     106             : static PyTypeObject netr_DELTA_ACCOUNT_Type;
     107             : static PyTypeObject netr_CIPHER_VALUE_Type;
     108             : static PyTypeObject netr_DELTA_SECRET_Type;
     109             : static PyTypeObject netr_DELTA_UNION_Type;
     110             : static PyTypeObject netr_DELTA_ID_UNION_Type;
     111             : static PyTypeObject netr_DELTA_ENUM_Type;
     112             : static PyTypeObject netr_DELTA_ENUM_ARRAY_Type;
     113             : static PyTypeObject netr_UAS_INFO_0_Type;
     114             : static PyTypeObject netr_AccountBuffer_Type;
     115             : static PyTypeObject netr_NETLOGON_INFO_1_Type;
     116             : static PyTypeObject netr_NETLOGON_INFO_2_Type;
     117             : static PyTypeObject netr_NETLOGON_INFO_3_Type;
     118             : static PyTypeObject netr_NETLOGON_INFO_4_Type;
     119             : static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type;
     120             : static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type;
     121             : static PyTypeObject netr_ChangeLogObject_Type;
     122             : static PyTypeObject netr_ChangeLogEntry_Type;
     123             : static PyTypeObject netr_Blob_Type;
     124             : static PyTypeObject netr_DsRGetDCNameInfo_Type;
     125             : static PyTypeObject netr_Capabilities_Type;
     126             : static PyTypeObject netr_LsaPolicyInformation_Type;
     127             : static PyTypeObject netr_OsVersionInfoEx_Type;
     128             : static PyTypeObject netr_OsVersion_Type;
     129             : static PyTypeObject netr_OsVersionContainer_Type;
     130             : static PyTypeObject netr_WorkstationInformation_Type;
     131             : static PyTypeObject netr_WorkstationInfo_Type;
     132             : static PyTypeObject netr_trust_extension_info_Type;
     133             : static PyTypeObject netr_trust_extension_Type;
     134             : static PyTypeObject netr_trust_extension_container_Type;
     135             : static PyTypeObject netr_OneDomainInfo_Type;
     136             : static PyTypeObject netr_DomainInformation_Type;
     137             : static PyTypeObject netr_DomainInfo_Type;
     138             : static PyTypeObject NL_PASSWORD_VERSION_Type;
     139             : static PyTypeObject netr_CryptPassword_Type;
     140             : static PyTypeObject netr_SendToSamResetBadPasswordCount_Type;
     141             : static PyTypeObject netr_SendToSamMessage_Type;
     142             : static PyTypeObject netr_SendToSamBase_Type;
     143             : static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type;
     144             : static PyTypeObject netr_DsRAddress_Type;
     145             : static PyTypeObject netr_DomainTrust_Type;
     146             : static PyTypeObject netr_DomainTrustList_Type;
     147             : static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type;
     148             : static PyTypeObject DcSitesCtr_Type;
     149             : static PyTypeObject netr_TrustInfo_Type;
     150             : static PyTypeObject NL_DNS_NAME_INFO_Type;
     151             : static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type;
     152             : static PyTypeObject netlogon_InterfaceType;
     153             : static PyTypeObject netr_LogonUasLogon_Type;
     154             : static PyTypeObject netr_LogonUasLogoff_Type;
     155             : static PyTypeObject netr_LogonSamLogon_Type;
     156             : static PyTypeObject netr_LogonSamLogoff_Type;
     157             : static PyTypeObject netr_ServerReqChallenge_Type;
     158             : static PyTypeObject netr_ServerAuthenticate_Type;
     159             : static PyTypeObject netr_ServerPasswordSet_Type;
     160             : static PyTypeObject netr_DatabaseDeltas_Type;
     161             : static PyTypeObject netr_DatabaseSync_Type;
     162             : static PyTypeObject netr_AccountDeltas_Type;
     163             : static PyTypeObject netr_AccountSync_Type;
     164             : static PyTypeObject netr_GetDcName_Type;
     165             : static PyTypeObject netr_LogonControl_Type;
     166             : static PyTypeObject netr_GetAnyDCName_Type;
     167             : static PyTypeObject netr_LogonControl2_Type;
     168             : static PyTypeObject netr_ServerAuthenticate2_Type;
     169             : static PyTypeObject netr_DatabaseSync2_Type;
     170             : static PyTypeObject netr_DatabaseRedo_Type;
     171             : static PyTypeObject netr_LogonControl2Ex_Type;
     172             : static PyTypeObject netr_NetrEnumerateTrustedDomains_Type;
     173             : static PyTypeObject netr_DsRGetDCName_Type;
     174             : static PyTypeObject netr_LogonGetCapabilities_Type;
     175             : static PyTypeObject netr_LogonGetTrustRid_Type;
     176             : static PyTypeObject netr_ServerAuthenticate3_Type;
     177             : static PyTypeObject netr_DsRGetDCNameEx_Type;
     178             : static PyTypeObject netr_DsRGetSiteName_Type;
     179             : static PyTypeObject netr_LogonGetDomainInfo_Type;
     180             : static PyTypeObject netr_ServerPasswordSet2_Type;
     181             : static PyTypeObject netr_ServerPasswordGet_Type;
     182             : static PyTypeObject netr_NetrLogonSendToSam_Type;
     183             : static PyTypeObject netr_DsRAddressToSitenamesW_Type;
     184             : static PyTypeObject netr_DsRGetDCNameEx2_Type;
     185             : static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type;
     186             : static PyTypeObject netr_DsRAddressToSitenamesExW_Type;
     187             : static PyTypeObject netr_DsrGetDcSiteCoverageW_Type;
     188             : static PyTypeObject netr_LogonSamLogonEx_Type;
     189             : static PyTypeObject netr_DsrEnumerateDomainTrusts_Type;
     190             : static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type;
     191             : static PyTypeObject netr_ServerTrustPasswordsGet_Type;
     192             : static PyTypeObject netr_DsRGetForestTrustInformation_Type;
     193             : static PyTypeObject netr_GetForestTrustInformation_Type;
     194             : static PyTypeObject netr_LogonSamLogonWithFlags_Type;
     195             : static PyTypeObject netr_ServerGetTrustInfo_Type;
     196             : static PyTypeObject netr_Unused47_Type;
     197             : static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type;
     198             : 
     199             : static PyTypeObject *BaseObject_Type;
     200             : static PyTypeObject *lsa_String_Type;
     201             : static PyTypeObject *samr_Password_Type;
     202             : static PyTypeObject *samr_RidWithAttributeArray_Type;
     203             : static PyTypeObject *lsa_StringLarge_Type;
     204             : static PyTypeObject *dom_sid_Type;
     205             : static PyTypeObject *samr_LogonHours_Type;
     206             : static PyTypeObject *lsa_BinaryString_Type;
     207             : static PyTypeObject *sec_desc_buf_Type;
     208             : static PyTypeObject *lsa_SidArray_Type;
     209             : static PyTypeObject *GUID_Type;
     210             : static PyTypeObject *lsa_ForestTrustInformation_Type;
     211             : static PyTypeObject *ClientConnection_Type;
     212             : static PyTypeObject *ndr_syntax_id_Type;
     213             : 
     214           0 : static PyObject *py_netr_UasInfo_get_account_name(PyObject *obj, void *closure)
     215             : {
     216           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     217             :         PyObject *py_account_name;
     218           0 :         if (object->account_name == NULL) {
     219           0 :                 Py_RETURN_NONE;
     220             :         }
     221           0 :         if (object->account_name == NULL) {
     222           0 :                 py_account_name = Py_None;
     223           0 :                 Py_INCREF(py_account_name);
     224             :         } else {
     225           0 :                 if (object->account_name == NULL) {
     226           0 :                         py_account_name = Py_None;
     227           0 :                         Py_INCREF(py_account_name);
     228             :                 } else {
     229           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
     230             :                 }
     231             :         }
     232           0 :         return py_account_name;
     233             : }
     234             : 
     235           0 : static int py_netr_UasInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
     236             : {
     237           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     238           0 :         if (value == NULL) {
     239           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
     240           0 :                 return -1;
     241             :         }
     242           0 :         if (value == Py_None) {
     243           0 :                 object->account_name = NULL;
     244             :         } else {
     245           0 :                 object->account_name = NULL;
     246             :                 {
     247             :                         const char *test_str;
     248             :                         const char *talloc_str;
     249           0 :                         PyObject *unicode = NULL;
     250           0 :                         if (PyUnicode_Check(value)) {
     251           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     252           0 :                                 if (unicode == NULL) {
     253           0 :                                         PyErr_NoMemory();
     254           0 :                                         return -1;
     255             :                                 }
     256           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     257           0 :                         } else if (PyBytes_Check(value)) {
     258           0 :                                 test_str = PyBytes_AS_STRING(value);
     259             :                         } else {
     260           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     261           0 :                                 return -1;
     262             :                         }
     263           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     264           0 :                         if (unicode != NULL) {
     265           0 :                                 Py_DECREF(unicode);
     266             :                         }
     267           0 :                         if (talloc_str == NULL) {
     268           0 :                                 PyErr_NoMemory();
     269           0 :                                 return -1;
     270             :                         }
     271           0 :                         object->account_name = talloc_str;
     272             :                 }
     273             :         }
     274           0 :         return 0;
     275             : }
     276             : 
     277           0 : static PyObject *py_netr_UasInfo_get_priv(PyObject *obj, void *closure)
     278             : {
     279           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     280             :         PyObject *py_priv;
     281           0 :         py_priv = PyLong_FromUnsignedLongLong((uint32_t)object->priv);
     282           0 :         return py_priv;
     283             : }
     284             : 
     285           0 : static int py_netr_UasInfo_set_priv(PyObject *py_obj, PyObject *value, void *closure)
     286             : {
     287           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     288           0 :         if (value == NULL) {
     289           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priv");
     290           0 :                 return -1;
     291             :         }
     292             :         {
     293           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priv));
     294           0 :                 if (PyLong_Check(value)) {
     295             :                         unsigned long long test_var;
     296           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     297           0 :                         if (PyErr_Occurred() != NULL) {
     298           0 :                                 return -1;
     299             :                         }
     300           0 :                         if (test_var > uint_max) {
     301           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     302             :                                   PyLong_Type.tp_name, uint_max, test_var);
     303           0 :                                 return -1;
     304             :                         }
     305           0 :                         object->priv = test_var;
     306             :                 } else {
     307           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     308             :                           PyLong_Type.tp_name);
     309           0 :                         return -1;
     310             :                 }
     311             :         }
     312           0 :         return 0;
     313             : }
     314             : 
     315           0 : static PyObject *py_netr_UasInfo_get_auth_flags(PyObject *obj, void *closure)
     316             : {
     317           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     318             :         PyObject *py_auth_flags;
     319           0 :         py_auth_flags = PyLong_FromUnsignedLongLong((uint32_t)object->auth_flags);
     320           0 :         return py_auth_flags;
     321             : }
     322             : 
     323           0 : static int py_netr_UasInfo_set_auth_flags(PyObject *py_obj, PyObject *value, void *closure)
     324             : {
     325           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     326           0 :         if (value == NULL) {
     327           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_flags");
     328           0 :                 return -1;
     329             :         }
     330             :         {
     331           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_flags));
     332           0 :                 if (PyLong_Check(value)) {
     333             :                         unsigned long long test_var;
     334           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     335           0 :                         if (PyErr_Occurred() != NULL) {
     336           0 :                                 return -1;
     337             :                         }
     338           0 :                         if (test_var > uint_max) {
     339           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     340             :                                   PyLong_Type.tp_name, uint_max, test_var);
     341           0 :                                 return -1;
     342             :                         }
     343           0 :                         object->auth_flags = test_var;
     344             :                 } else {
     345           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     346             :                           PyLong_Type.tp_name);
     347           0 :                         return -1;
     348             :                 }
     349             :         }
     350           0 :         return 0;
     351             : }
     352             : 
     353           0 : static PyObject *py_netr_UasInfo_get_logon_count(PyObject *obj, void *closure)
     354             : {
     355           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     356             :         PyObject *py_logon_count;
     357           0 :         py_logon_count = PyLong_FromUnsignedLongLong((uint32_t)object->logon_count);
     358           0 :         return py_logon_count;
     359             : }
     360             : 
     361           0 : static int py_netr_UasInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
     362             : {
     363           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     364           0 :         if (value == NULL) {
     365           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
     366           0 :                 return -1;
     367             :         }
     368             :         {
     369           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
     370           0 :                 if (PyLong_Check(value)) {
     371             :                         unsigned long long test_var;
     372           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     373           0 :                         if (PyErr_Occurred() != NULL) {
     374           0 :                                 return -1;
     375             :                         }
     376           0 :                         if (test_var > uint_max) {
     377           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     378             :                                   PyLong_Type.tp_name, uint_max, test_var);
     379           0 :                                 return -1;
     380             :                         }
     381           0 :                         object->logon_count = test_var;
     382             :                 } else {
     383           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     384             :                           PyLong_Type.tp_name);
     385           0 :                         return -1;
     386             :                 }
     387             :         }
     388           0 :         return 0;
     389             : }
     390             : 
     391           0 : static PyObject *py_netr_UasInfo_get_bad_pw_count(PyObject *obj, void *closure)
     392             : {
     393           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     394             :         PyObject *py_bad_pw_count;
     395           0 :         py_bad_pw_count = PyLong_FromUnsignedLongLong((uint32_t)object->bad_pw_count);
     396           0 :         return py_bad_pw_count;
     397             : }
     398             : 
     399           0 : static int py_netr_UasInfo_set_bad_pw_count(PyObject *py_obj, PyObject *value, void *closure)
     400             : {
     401           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     402           0 :         if (value == NULL) {
     403           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_pw_count");
     404           0 :                 return -1;
     405             :         }
     406             :         {
     407           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_pw_count));
     408           0 :                 if (PyLong_Check(value)) {
     409             :                         unsigned long long test_var;
     410           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     411           0 :                         if (PyErr_Occurred() != NULL) {
     412           0 :                                 return -1;
     413             :                         }
     414           0 :                         if (test_var > uint_max) {
     415           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     416             :                                   PyLong_Type.tp_name, uint_max, test_var);
     417           0 :                                 return -1;
     418             :                         }
     419           0 :                         object->bad_pw_count = test_var;
     420             :                 } else {
     421           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     422             :                           PyLong_Type.tp_name);
     423           0 :                         return -1;
     424             :                 }
     425             :         }
     426           0 :         return 0;
     427             : }
     428             : 
     429           0 : static PyObject *py_netr_UasInfo_get_last_logon(PyObject *obj, void *closure)
     430             : {
     431           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     432             :         PyObject *py_last_logon;
     433           0 :         py_last_logon = PyLong_FromLong(object->last_logon);
     434           0 :         return py_last_logon;
     435             : }
     436             : 
     437           0 : static int py_netr_UasInfo_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
     438             : {
     439           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     440           0 :         if (value == NULL) {
     441           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logon");
     442           0 :                 return -1;
     443             :         }
     444             :         {
     445           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logon));
     446           0 :                 const long long int_min = -int_max - 1;
     447           0 :                 if (PyLong_Check(value)) {
     448             :                         long long test_var;
     449           0 :                         test_var = PyLong_AsLongLong(value);
     450           0 :                         if (PyErr_Occurred() != NULL) {
     451           0 :                                 return -1;
     452             :                         }
     453           0 :                         if (test_var < int_min || test_var > int_max) {
     454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     455             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     456           0 :                                 return -1;
     457             :                         }
     458           0 :                         object->last_logon = test_var;
     459             :                 } else {
     460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     461             :                           PyLong_Type.tp_name);
     462           0 :                         return -1;
     463             :                 }
     464             :         }
     465           0 :         return 0;
     466             : }
     467             : 
     468           0 : static PyObject *py_netr_UasInfo_get_last_logoff(PyObject *obj, void *closure)
     469             : {
     470           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     471             :         PyObject *py_last_logoff;
     472           0 :         py_last_logoff = PyLong_FromLong(object->last_logoff);
     473           0 :         return py_last_logoff;
     474             : }
     475             : 
     476           0 : static int py_netr_UasInfo_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
     477             : {
     478           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     479           0 :         if (value == NULL) {
     480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logoff");
     481           0 :                 return -1;
     482             :         }
     483             :         {
     484           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logoff));
     485           0 :                 const long long int_min = -int_max - 1;
     486           0 :                 if (PyLong_Check(value)) {
     487             :                         long long test_var;
     488           0 :                         test_var = PyLong_AsLongLong(value);
     489           0 :                         if (PyErr_Occurred() != NULL) {
     490           0 :                                 return -1;
     491             :                         }
     492           0 :                         if (test_var < int_min || test_var > int_max) {
     493           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     494             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     495           0 :                                 return -1;
     496             :                         }
     497           0 :                         object->last_logoff = test_var;
     498             :                 } else {
     499           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     500             :                           PyLong_Type.tp_name);
     501           0 :                         return -1;
     502             :                 }
     503             :         }
     504           0 :         return 0;
     505             : }
     506             : 
     507           0 : static PyObject *py_netr_UasInfo_get_logoff_time(PyObject *obj, void *closure)
     508             : {
     509           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     510             :         PyObject *py_logoff_time;
     511           0 :         py_logoff_time = PyLong_FromLong(object->logoff_time);
     512           0 :         return py_logoff_time;
     513             : }
     514             : 
     515           0 : static int py_netr_UasInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
     516             : {
     517           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     518           0 :         if (value == NULL) {
     519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logoff_time");
     520           0 :                 return -1;
     521             :         }
     522             :         {
     523           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->logoff_time));
     524           0 :                 const long long int_min = -int_max - 1;
     525           0 :                 if (PyLong_Check(value)) {
     526             :                         long long test_var;
     527           0 :                         test_var = PyLong_AsLongLong(value);
     528           0 :                         if (PyErr_Occurred() != NULL) {
     529           0 :                                 return -1;
     530             :                         }
     531           0 :                         if (test_var < int_min || test_var > int_max) {
     532           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     533             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     534           0 :                                 return -1;
     535             :                         }
     536           0 :                         object->logoff_time = test_var;
     537             :                 } else {
     538           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     539             :                           PyLong_Type.tp_name);
     540           0 :                         return -1;
     541             :                 }
     542             :         }
     543           0 :         return 0;
     544             : }
     545             : 
     546           0 : static PyObject *py_netr_UasInfo_get_kickoff_time(PyObject *obj, void *closure)
     547             : {
     548           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     549             :         PyObject *py_kickoff_time;
     550           0 :         py_kickoff_time = PyLong_FromLong(object->kickoff_time);
     551           0 :         return py_kickoff_time;
     552             : }
     553             : 
     554           0 : static int py_netr_UasInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
     555             : {
     556           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     557           0 :         if (value == NULL) {
     558           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->kickoff_time");
     559           0 :                 return -1;
     560             :         }
     561             :         {
     562           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->kickoff_time));
     563           0 :                 const long long int_min = -int_max - 1;
     564           0 :                 if (PyLong_Check(value)) {
     565             :                         long long test_var;
     566           0 :                         test_var = PyLong_AsLongLong(value);
     567           0 :                         if (PyErr_Occurred() != NULL) {
     568           0 :                                 return -1;
     569             :                         }
     570           0 :                         if (test_var < int_min || test_var > int_max) {
     571           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     572             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     573           0 :                                 return -1;
     574             :                         }
     575           0 :                         object->kickoff_time = test_var;
     576             :                 } else {
     577           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     578             :                           PyLong_Type.tp_name);
     579           0 :                         return -1;
     580             :                 }
     581             :         }
     582           0 :         return 0;
     583             : }
     584             : 
     585           0 : static PyObject *py_netr_UasInfo_get_password_age(PyObject *obj, void *closure)
     586             : {
     587           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     588             :         PyObject *py_password_age;
     589           0 :         py_password_age = PyLong_FromUnsignedLongLong((uint32_t)object->password_age);
     590           0 :         return py_password_age;
     591             : }
     592             : 
     593           0 : static int py_netr_UasInfo_set_password_age(PyObject *py_obj, PyObject *value, void *closure)
     594             : {
     595           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     596           0 :         if (value == NULL) {
     597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_age");
     598           0 :                 return -1;
     599             :         }
     600             :         {
     601           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_age));
     602           0 :                 if (PyLong_Check(value)) {
     603             :                         unsigned long long test_var;
     604           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     605           0 :                         if (PyErr_Occurred() != NULL) {
     606           0 :                                 return -1;
     607             :                         }
     608           0 :                         if (test_var > uint_max) {
     609           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     610             :                                   PyLong_Type.tp_name, uint_max, test_var);
     611           0 :                                 return -1;
     612             :                         }
     613           0 :                         object->password_age = test_var;
     614             :                 } else {
     615           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     616             :                           PyLong_Type.tp_name);
     617           0 :                         return -1;
     618             :                 }
     619             :         }
     620           0 :         return 0;
     621             : }
     622             : 
     623           0 : static PyObject *py_netr_UasInfo_get_pw_can_change(PyObject *obj, void *closure)
     624             : {
     625           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     626             :         PyObject *py_pw_can_change;
     627           0 :         py_pw_can_change = PyLong_FromLong(object->pw_can_change);
     628           0 :         return py_pw_can_change;
     629             : }
     630             : 
     631           0 : static int py_netr_UasInfo_set_pw_can_change(PyObject *py_obj, PyObject *value, void *closure)
     632             : {
     633           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     634           0 :         if (value == NULL) {
     635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pw_can_change");
     636           0 :                 return -1;
     637             :         }
     638             :         {
     639           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_can_change));
     640           0 :                 const long long int_min = -int_max - 1;
     641           0 :                 if (PyLong_Check(value)) {
     642             :                         long long test_var;
     643           0 :                         test_var = PyLong_AsLongLong(value);
     644           0 :                         if (PyErr_Occurred() != NULL) {
     645           0 :                                 return -1;
     646             :                         }
     647           0 :                         if (test_var < int_min || test_var > int_max) {
     648           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     649             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     650           0 :                                 return -1;
     651             :                         }
     652           0 :                         object->pw_can_change = test_var;
     653             :                 } else {
     654           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     655             :                           PyLong_Type.tp_name);
     656           0 :                         return -1;
     657             :                 }
     658             :         }
     659           0 :         return 0;
     660             : }
     661             : 
     662           0 : static PyObject *py_netr_UasInfo_get_pw_must_change(PyObject *obj, void *closure)
     663             : {
     664           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     665             :         PyObject *py_pw_must_change;
     666           0 :         py_pw_must_change = PyLong_FromLong(object->pw_must_change);
     667           0 :         return py_pw_must_change;
     668             : }
     669             : 
     670           0 : static int py_netr_UasInfo_set_pw_must_change(PyObject *py_obj, PyObject *value, void *closure)
     671             : {
     672           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     673           0 :         if (value == NULL) {
     674           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pw_must_change");
     675           0 :                 return -1;
     676             :         }
     677             :         {
     678           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_must_change));
     679           0 :                 const long long int_min = -int_max - 1;
     680           0 :                 if (PyLong_Check(value)) {
     681             :                         long long test_var;
     682           0 :                         test_var = PyLong_AsLongLong(value);
     683           0 :                         if (PyErr_Occurred() != NULL) {
     684           0 :                                 return -1;
     685             :                         }
     686           0 :                         if (test_var < int_min || test_var > int_max) {
     687           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     688             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     689           0 :                                 return -1;
     690             :                         }
     691           0 :                         object->pw_must_change = test_var;
     692             :                 } else {
     693           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     694             :                           PyLong_Type.tp_name);
     695           0 :                         return -1;
     696             :                 }
     697             :         }
     698           0 :         return 0;
     699             : }
     700             : 
     701           0 : static PyObject *py_netr_UasInfo_get_computer(PyObject *obj, void *closure)
     702             : {
     703           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     704             :         PyObject *py_computer;
     705           0 :         if (object->computer == NULL) {
     706           0 :                 Py_RETURN_NONE;
     707             :         }
     708           0 :         if (object->computer == NULL) {
     709           0 :                 py_computer = Py_None;
     710           0 :                 Py_INCREF(py_computer);
     711             :         } else {
     712           0 :                 if (object->computer == NULL) {
     713           0 :                         py_computer = Py_None;
     714           0 :                         Py_INCREF(py_computer);
     715             :                 } else {
     716           0 :                         py_computer = PyUnicode_Decode(object->computer, strlen(object->computer), "utf-8", "ignore");
     717             :                 }
     718             :         }
     719           0 :         return py_computer;
     720             : }
     721             : 
     722           0 : static int py_netr_UasInfo_set_computer(PyObject *py_obj, PyObject *value, void *closure)
     723             : {
     724           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     725           0 :         if (value == NULL) {
     726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer");
     727           0 :                 return -1;
     728             :         }
     729           0 :         if (value == Py_None) {
     730           0 :                 object->computer = NULL;
     731             :         } else {
     732           0 :                 object->computer = NULL;
     733             :                 {
     734             :                         const char *test_str;
     735             :                         const char *talloc_str;
     736           0 :                         PyObject *unicode = NULL;
     737           0 :                         if (PyUnicode_Check(value)) {
     738           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     739           0 :                                 if (unicode == NULL) {
     740           0 :                                         PyErr_NoMemory();
     741           0 :                                         return -1;
     742             :                                 }
     743           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     744           0 :                         } else if (PyBytes_Check(value)) {
     745           0 :                                 test_str = PyBytes_AS_STRING(value);
     746             :                         } else {
     747           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     748           0 :                                 return -1;
     749             :                         }
     750           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     751           0 :                         if (unicode != NULL) {
     752           0 :                                 Py_DECREF(unicode);
     753             :                         }
     754           0 :                         if (talloc_str == NULL) {
     755           0 :                                 PyErr_NoMemory();
     756           0 :                                 return -1;
     757             :                         }
     758           0 :                         object->computer = talloc_str;
     759             :                 }
     760             :         }
     761           0 :         return 0;
     762             : }
     763             : 
     764           0 : static PyObject *py_netr_UasInfo_get_domain(PyObject *obj, void *closure)
     765             : {
     766           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     767             :         PyObject *py_domain;
     768           0 :         if (object->domain == NULL) {
     769           0 :                 Py_RETURN_NONE;
     770             :         }
     771           0 :         if (object->domain == NULL) {
     772           0 :                 py_domain = Py_None;
     773           0 :                 Py_INCREF(py_domain);
     774             :         } else {
     775           0 :                 if (object->domain == NULL) {
     776           0 :                         py_domain = Py_None;
     777           0 :                         Py_INCREF(py_domain);
     778             :                 } else {
     779           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
     780             :                 }
     781             :         }
     782           0 :         return py_domain;
     783             : }
     784             : 
     785           0 : static int py_netr_UasInfo_set_domain(PyObject *py_obj, PyObject *value, void *closure)
     786             : {
     787           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     788           0 :         if (value == NULL) {
     789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
     790           0 :                 return -1;
     791             :         }
     792           0 :         if (value == Py_None) {
     793           0 :                 object->domain = NULL;
     794             :         } else {
     795           0 :                 object->domain = NULL;
     796             :                 {
     797             :                         const char *test_str;
     798             :                         const char *talloc_str;
     799           0 :                         PyObject *unicode = NULL;
     800           0 :                         if (PyUnicode_Check(value)) {
     801           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     802           0 :                                 if (unicode == NULL) {
     803           0 :                                         PyErr_NoMemory();
     804           0 :                                         return -1;
     805             :                                 }
     806           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     807           0 :                         } else if (PyBytes_Check(value)) {
     808           0 :                                 test_str = PyBytes_AS_STRING(value);
     809             :                         } else {
     810           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     811           0 :                                 return -1;
     812             :                         }
     813           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     814           0 :                         if (unicode != NULL) {
     815           0 :                                 Py_DECREF(unicode);
     816             :                         }
     817           0 :                         if (talloc_str == NULL) {
     818           0 :                                 PyErr_NoMemory();
     819           0 :                                 return -1;
     820             :                         }
     821           0 :                         object->domain = talloc_str;
     822             :                 }
     823             :         }
     824           0 :         return 0;
     825             : }
     826             : 
     827           0 : static PyObject *py_netr_UasInfo_get_script_path(PyObject *obj, void *closure)
     828             : {
     829           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     830             :         PyObject *py_script_path;
     831           0 :         if (object->script_path == NULL) {
     832           0 :                 Py_RETURN_NONE;
     833             :         }
     834           0 :         if (object->script_path == NULL) {
     835           0 :                 py_script_path = Py_None;
     836           0 :                 Py_INCREF(py_script_path);
     837             :         } else {
     838           0 :                 if (object->script_path == NULL) {
     839           0 :                         py_script_path = Py_None;
     840           0 :                         Py_INCREF(py_script_path);
     841             :                 } else {
     842           0 :                         py_script_path = PyUnicode_Decode(object->script_path, strlen(object->script_path), "utf-8", "ignore");
     843             :                 }
     844             :         }
     845           0 :         return py_script_path;
     846             : }
     847             : 
     848           0 : static int py_netr_UasInfo_set_script_path(PyObject *py_obj, PyObject *value, void *closure)
     849             : {
     850           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     851           0 :         if (value == NULL) {
     852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->script_path");
     853           0 :                 return -1;
     854             :         }
     855           0 :         if (value == Py_None) {
     856           0 :                 object->script_path = NULL;
     857             :         } else {
     858           0 :                 object->script_path = NULL;
     859             :                 {
     860             :                         const char *test_str;
     861             :                         const char *talloc_str;
     862           0 :                         PyObject *unicode = NULL;
     863           0 :                         if (PyUnicode_Check(value)) {
     864           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     865           0 :                                 if (unicode == NULL) {
     866           0 :                                         PyErr_NoMemory();
     867           0 :                                         return -1;
     868             :                                 }
     869           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     870           0 :                         } else if (PyBytes_Check(value)) {
     871           0 :                                 test_str = PyBytes_AS_STRING(value);
     872             :                         } else {
     873           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     874           0 :                                 return -1;
     875             :                         }
     876           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     877           0 :                         if (unicode != NULL) {
     878           0 :                                 Py_DECREF(unicode);
     879             :                         }
     880           0 :                         if (talloc_str == NULL) {
     881           0 :                                 PyErr_NoMemory();
     882           0 :                                 return -1;
     883             :                         }
     884           0 :                         object->script_path = talloc_str;
     885             :                 }
     886             :         }
     887           0 :         return 0;
     888             : }
     889             : 
     890           0 : static PyObject *py_netr_UasInfo_get_unknown(PyObject *obj, void *closure)
     891             : {
     892           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     893             :         PyObject *py_unknown;
     894           0 :         py_unknown = PyLong_FromUnsignedLongLong((uint32_t)object->unknown);
     895           0 :         return py_unknown;
     896             : }
     897             : 
     898           0 : static int py_netr_UasInfo_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
     899             : {
     900           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     901           0 :         if (value == NULL) {
     902           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown");
     903           0 :                 return -1;
     904             :         }
     905             :         {
     906           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
     907           0 :                 if (PyLong_Check(value)) {
     908             :                         unsigned long long test_var;
     909           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     910           0 :                         if (PyErr_Occurred() != NULL) {
     911           0 :                                 return -1;
     912             :                         }
     913           0 :                         if (test_var > uint_max) {
     914           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     915             :                                   PyLong_Type.tp_name, uint_max, test_var);
     916           0 :                                 return -1;
     917             :                         }
     918           0 :                         object->unknown = test_var;
     919             :                 } else {
     920           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     921             :                           PyLong_Type.tp_name);
     922           0 :                         return -1;
     923             :                 }
     924             :         }
     925           0 :         return 0;
     926             : }
     927             : 
     928             : static PyGetSetDef py_netr_UasInfo_getsetters[] = {
     929             :         {
     930             :                 .name = discard_const_p(char, "account_name"),
     931             :                 .get = py_netr_UasInfo_get_account_name,
     932             :                 .set = py_netr_UasInfo_set_account_name,
     933             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     934             :         },
     935             :         {
     936             :                 .name = discard_const_p(char, "priv"),
     937             :                 .get = py_netr_UasInfo_get_priv,
     938             :                 .set = py_netr_UasInfo_set_priv,
     939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     940             :         },
     941             :         {
     942             :                 .name = discard_const_p(char, "auth_flags"),
     943             :                 .get = py_netr_UasInfo_get_auth_flags,
     944             :                 .set = py_netr_UasInfo_set_auth_flags,
     945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     946             :         },
     947             :         {
     948             :                 .name = discard_const_p(char, "logon_count"),
     949             :                 .get = py_netr_UasInfo_get_logon_count,
     950             :                 .set = py_netr_UasInfo_set_logon_count,
     951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     952             :         },
     953             :         {
     954             :                 .name = discard_const_p(char, "bad_pw_count"),
     955             :                 .get = py_netr_UasInfo_get_bad_pw_count,
     956             :                 .set = py_netr_UasInfo_set_bad_pw_count,
     957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     958             :         },
     959             :         {
     960             :                 .name = discard_const_p(char, "last_logon"),
     961             :                 .get = py_netr_UasInfo_get_last_logon,
     962             :                 .set = py_netr_UasInfo_set_last_logon,
     963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     964             :         },
     965             :         {
     966             :                 .name = discard_const_p(char, "last_logoff"),
     967             :                 .get = py_netr_UasInfo_get_last_logoff,
     968             :                 .set = py_netr_UasInfo_set_last_logoff,
     969             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     970             :         },
     971             :         {
     972             :                 .name = discard_const_p(char, "logoff_time"),
     973             :                 .get = py_netr_UasInfo_get_logoff_time,
     974             :                 .set = py_netr_UasInfo_set_logoff_time,
     975             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     976             :         },
     977             :         {
     978             :                 .name = discard_const_p(char, "kickoff_time"),
     979             :                 .get = py_netr_UasInfo_get_kickoff_time,
     980             :                 .set = py_netr_UasInfo_set_kickoff_time,
     981             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     982             :         },
     983             :         {
     984             :                 .name = discard_const_p(char, "password_age"),
     985             :                 .get = py_netr_UasInfo_get_password_age,
     986             :                 .set = py_netr_UasInfo_set_password_age,
     987             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     988             :         },
     989             :         {
     990             :                 .name = discard_const_p(char, "pw_can_change"),
     991             :                 .get = py_netr_UasInfo_get_pw_can_change,
     992             :                 .set = py_netr_UasInfo_set_pw_can_change,
     993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     994             :         },
     995             :         {
     996             :                 .name = discard_const_p(char, "pw_must_change"),
     997             :                 .get = py_netr_UasInfo_get_pw_must_change,
     998             :                 .set = py_netr_UasInfo_set_pw_must_change,
     999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
    1000             :         },
    1001             :         {
    1002             :                 .name = discard_const_p(char, "computer"),
    1003             :                 .get = py_netr_UasInfo_get_computer,
    1004             :                 .set = py_netr_UasInfo_set_computer,
    1005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1006             :         },
    1007             :         {
    1008             :                 .name = discard_const_p(char, "domain"),
    1009             :                 .get = py_netr_UasInfo_get_domain,
    1010             :                 .set = py_netr_UasInfo_set_domain,
    1011             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1012             :         },
    1013             :         {
    1014             :                 .name = discard_const_p(char, "script_path"),
    1015             :                 .get = py_netr_UasInfo_get_script_path,
    1016             :                 .set = py_netr_UasInfo_set_script_path,
    1017             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1018             :         },
    1019             :         {
    1020             :                 .name = discard_const_p(char, "unknown"),
    1021             :                 .get = py_netr_UasInfo_get_unknown,
    1022             :                 .set = py_netr_UasInfo_set_unknown,
    1023             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1024             :         },
    1025             :         { .name = NULL }
    1026             : };
    1027             : 
    1028           0 : static PyObject *py_netr_UasInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1029             : {
    1030           0 :         return pytalloc_new(struct netr_UasInfo, type);
    1031             : }
    1032             : 
    1033             : 
    1034             : static PyTypeObject netr_UasInfo_Type = {
    1035             :         PyVarObject_HEAD_INIT(NULL, 0)
    1036             :         .tp_name = "netlogon.netr_UasInfo",
    1037             :         .tp_getset = py_netr_UasInfo_getsetters,
    1038             :         .tp_methods = NULL,
    1039             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1040             :         .tp_new = py_netr_UasInfo_new,
    1041             : };
    1042             : 
    1043             : 
    1044           0 : static PyObject *py_netr_UasLogoffInfo_get_duration(PyObject *obj, void *closure)
    1045             : {
    1046           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(obj);
    1047             :         PyObject *py_duration;
    1048           0 :         py_duration = PyLong_FromUnsignedLongLong((uint32_t)object->duration);
    1049           0 :         return py_duration;
    1050             : }
    1051             : 
    1052           0 : static int py_netr_UasLogoffInfo_set_duration(PyObject *py_obj, PyObject *value, void *closure)
    1053             : {
    1054           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(py_obj);
    1055           0 :         if (value == NULL) {
    1056           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->duration");
    1057           0 :                 return -1;
    1058             :         }
    1059             :         {
    1060           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->duration));
    1061           0 :                 if (PyLong_Check(value)) {
    1062             :                         unsigned long long test_var;
    1063           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1064           0 :                         if (PyErr_Occurred() != NULL) {
    1065           0 :                                 return -1;
    1066             :                         }
    1067           0 :                         if (test_var > uint_max) {
    1068           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1069             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1070           0 :                                 return -1;
    1071             :                         }
    1072           0 :                         object->duration = test_var;
    1073             :                 } else {
    1074           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1075             :                           PyLong_Type.tp_name);
    1076           0 :                         return -1;
    1077             :                 }
    1078             :         }
    1079           0 :         return 0;
    1080             : }
    1081             : 
    1082           0 : static PyObject *py_netr_UasLogoffInfo_get_logon_count(PyObject *obj, void *closure)
    1083             : {
    1084           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(obj);
    1085             :         PyObject *py_logon_count;
    1086           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    1087           0 :         return py_logon_count;
    1088             : }
    1089             : 
    1090           0 : static int py_netr_UasLogoffInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    1091             : {
    1092           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(py_obj);
    1093           0 :         if (value == NULL) {
    1094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    1095           0 :                 return -1;
    1096             :         }
    1097             :         {
    1098           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    1099           0 :                 if (PyLong_Check(value)) {
    1100             :                         unsigned long long test_var;
    1101           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1102           0 :                         if (PyErr_Occurred() != NULL) {
    1103           0 :                                 return -1;
    1104             :                         }
    1105           0 :                         if (test_var > uint_max) {
    1106           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1107             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1108           0 :                                 return -1;
    1109             :                         }
    1110           0 :                         object->logon_count = test_var;
    1111             :                 } else {
    1112           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1113             :                           PyLong_Type.tp_name);
    1114           0 :                         return -1;
    1115             :                 }
    1116             :         }
    1117           0 :         return 0;
    1118             : }
    1119             : 
    1120             : static PyGetSetDef py_netr_UasLogoffInfo_getsetters[] = {
    1121             :         {
    1122             :                 .name = discard_const_p(char, "duration"),
    1123             :                 .get = py_netr_UasLogoffInfo_get_duration,
    1124             :                 .set = py_netr_UasLogoffInfo_set_duration,
    1125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1126             :         },
    1127             :         {
    1128             :                 .name = discard_const_p(char, "logon_count"),
    1129             :                 .get = py_netr_UasLogoffInfo_get_logon_count,
    1130             :                 .set = py_netr_UasLogoffInfo_set_logon_count,
    1131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1132             :         },
    1133             :         { .name = NULL }
    1134             : };
    1135             : 
    1136           0 : static PyObject *py_netr_UasLogoffInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1137             : {
    1138           0 :         return pytalloc_new(struct netr_UasLogoffInfo, type);
    1139             : }
    1140             : 
    1141             : 
    1142             : static PyTypeObject netr_UasLogoffInfo_Type = {
    1143             :         PyVarObject_HEAD_INIT(NULL, 0)
    1144             :         .tp_name = "netlogon.netr_UasLogoffInfo",
    1145             :         .tp_getset = py_netr_UasLogoffInfo_getsetters,
    1146             :         .tp_methods = NULL,
    1147             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1148             :         .tp_new = py_netr_UasLogoffInfo_new,
    1149             : };
    1150             : 
    1151             : 
    1152           0 : static PyObject *py_netr_AcctLockStr_get_lockout_duration(PyObject *obj, void *closure)
    1153             : {
    1154           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1155             :         PyObject *py_lockout_duration;
    1156           0 :         py_lockout_duration = PyLong_FromLongLong(object->lockout_duration);
    1157           0 :         return py_lockout_duration;
    1158             : }
    1159             : 
    1160           0 : static int py_netr_AcctLockStr_set_lockout_duration(PyObject *py_obj, PyObject *value, void *closure)
    1161             : {
    1162           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1163           0 :         if (value == NULL) {
    1164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lockout_duration");
    1165           0 :                 return -1;
    1166             :         }
    1167             :         {
    1168           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->lockout_duration));
    1169           0 :                 const long long int_min = -int_max - 1;
    1170           0 :                 if (PyLong_Check(value)) {
    1171             :                         long long test_var;
    1172           0 :                         test_var = PyLong_AsLongLong(value);
    1173           0 :                         if (PyErr_Occurred() != NULL) {
    1174           0 :                                 return -1;
    1175             :                         }
    1176           0 :                         if (test_var < int_min || test_var > int_max) {
    1177           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    1178             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    1179           0 :                                 return -1;
    1180             :                         }
    1181           0 :                         object->lockout_duration = test_var;
    1182             :                 } else {
    1183           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1184             :                           PyLong_Type.tp_name);
    1185           0 :                         return -1;
    1186             :                 }
    1187             :         }
    1188           0 :         return 0;
    1189             : }
    1190             : 
    1191           0 : static PyObject *py_netr_AcctLockStr_get_reset_count(PyObject *obj, void *closure)
    1192             : {
    1193           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1194             :         PyObject *py_reset_count;
    1195           0 :         py_reset_count = PyLong_FromUnsignedLongLong(object->reset_count);
    1196           0 :         return py_reset_count;
    1197             : }
    1198             : 
    1199           0 : static int py_netr_AcctLockStr_set_reset_count(PyObject *py_obj, PyObject *value, void *closure)
    1200             : {
    1201           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1202           0 :         if (value == NULL) {
    1203           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reset_count");
    1204           0 :                 return -1;
    1205             :         }
    1206             :         {
    1207           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reset_count));
    1208           0 :                 if (PyLong_Check(value)) {
    1209             :                         unsigned long long test_var;
    1210           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1211           0 :                         if (PyErr_Occurred() != NULL) {
    1212           0 :                                 return -1;
    1213             :                         }
    1214           0 :                         if (test_var > uint_max) {
    1215           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1216             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1217           0 :                                 return -1;
    1218             :                         }
    1219           0 :                         object->reset_count = test_var;
    1220             :                 } else {
    1221           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1222             :                           PyLong_Type.tp_name);
    1223           0 :                         return -1;
    1224             :                 }
    1225             :         }
    1226           0 :         return 0;
    1227             : }
    1228             : 
    1229           0 : static PyObject *py_netr_AcctLockStr_get_bad_attempt_lockout(PyObject *obj, void *closure)
    1230             : {
    1231           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1232             :         PyObject *py_bad_attempt_lockout;
    1233           0 :         py_bad_attempt_lockout = PyLong_FromUnsignedLongLong((uint32_t)object->bad_attempt_lockout);
    1234           0 :         return py_bad_attempt_lockout;
    1235             : }
    1236             : 
    1237           0 : static int py_netr_AcctLockStr_set_bad_attempt_lockout(PyObject *py_obj, PyObject *value, void *closure)
    1238             : {
    1239           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1240           0 :         if (value == NULL) {
    1241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_attempt_lockout");
    1242           0 :                 return -1;
    1243             :         }
    1244             :         {
    1245           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_attempt_lockout));
    1246           0 :                 if (PyLong_Check(value)) {
    1247             :                         unsigned long long test_var;
    1248           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1249           0 :                         if (PyErr_Occurred() != NULL) {
    1250           0 :                                 return -1;
    1251             :                         }
    1252           0 :                         if (test_var > uint_max) {
    1253           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1254             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1255           0 :                                 return -1;
    1256             :                         }
    1257           0 :                         object->bad_attempt_lockout = test_var;
    1258             :                 } else {
    1259           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1260             :                           PyLong_Type.tp_name);
    1261           0 :                         return -1;
    1262             :                 }
    1263             :         }
    1264           0 :         return 0;
    1265             : }
    1266             : 
    1267           0 : static PyObject *py_netr_AcctLockStr_get_dummy(PyObject *obj, void *closure)
    1268             : {
    1269           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1270             :         PyObject *py_dummy;
    1271           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)object->dummy);
    1272           0 :         return py_dummy;
    1273             : }
    1274             : 
    1275           0 : static int py_netr_AcctLockStr_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
    1276             : {
    1277           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1278           0 :         if (value == NULL) {
    1279           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy");
    1280           0 :                 return -1;
    1281             :         }
    1282             :         {
    1283           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
    1284           0 :                 if (PyLong_Check(value)) {
    1285             :                         unsigned long long test_var;
    1286           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1287           0 :                         if (PyErr_Occurred() != NULL) {
    1288           0 :                                 return -1;
    1289             :                         }
    1290           0 :                         if (test_var > uint_max) {
    1291           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1292             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1293           0 :                                 return -1;
    1294             :                         }
    1295           0 :                         object->dummy = test_var;
    1296             :                 } else {
    1297           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1298             :                           PyLong_Type.tp_name);
    1299           0 :                         return -1;
    1300             :                 }
    1301             :         }
    1302           0 :         return 0;
    1303             : }
    1304             : 
    1305             : static PyGetSetDef py_netr_AcctLockStr_getsetters[] = {
    1306             :         {
    1307             :                 .name = discard_const_p(char, "lockout_duration"),
    1308             :                 .get = py_netr_AcctLockStr_get_lockout_duration,
    1309             :                 .set = py_netr_AcctLockStr_set_lockout_duration,
    1310             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    1311             :         },
    1312             :         {
    1313             :                 .name = discard_const_p(char, "reset_count"),
    1314             :                 .get = py_netr_AcctLockStr_get_reset_count,
    1315             :                 .set = py_netr_AcctLockStr_set_reset_count,
    1316             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1317             :         },
    1318             :         {
    1319             :                 .name = discard_const_p(char, "bad_attempt_lockout"),
    1320             :                 .get = py_netr_AcctLockStr_get_bad_attempt_lockout,
    1321             :                 .set = py_netr_AcctLockStr_set_bad_attempt_lockout,
    1322             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1323             :         },
    1324             :         {
    1325             :                 .name = discard_const_p(char, "dummy"),
    1326             :                 .get = py_netr_AcctLockStr_get_dummy,
    1327             :                 .set = py_netr_AcctLockStr_set_dummy,
    1328             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1329             :         },
    1330             :         { .name = NULL }
    1331             : };
    1332             : 
    1333           0 : static PyObject *py_netr_AcctLockStr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1334             : {
    1335           0 :         return pytalloc_new(struct netr_AcctLockStr, type);
    1336             : }
    1337             : 
    1338           0 : static PyObject *py_netr_AcctLockStr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1339             : {
    1340           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1341           0 :         PyObject *ret = NULL;
    1342             :         DATA_BLOB blob;
    1343             :         enum ndr_err_code err;
    1344           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1345           0 :         if (tmp_ctx == NULL) {
    1346           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1347           0 :                 return NULL;
    1348             :         }
    1349           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_AcctLockStr);
    1350           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1351           0 :                 TALLOC_FREE(tmp_ctx);
    1352           0 :                 PyErr_SetNdrError(err);
    1353           0 :                 return NULL;
    1354             :         }
    1355             : 
    1356           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1357           0 :         TALLOC_FREE(tmp_ctx);
    1358           0 :         return ret;
    1359             : }
    1360             : 
    1361           0 : static PyObject *py_netr_AcctLockStr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1362             : {
    1363           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1364           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1365           0 :         Py_ssize_t blob_length = 0;
    1366             :         enum ndr_err_code err;
    1367           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1368           0 :         PyObject *allow_remaining_obj = NULL;
    1369           0 :         bool allow_remaining = false;
    1370             : 
    1371           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1372             :                 discard_const_p(char *, kwnames),
    1373             :                 &blob.data, &blob_length,
    1374             :                 &allow_remaining_obj)) {
    1375           0 :                 return NULL;
    1376             :         }
    1377           0 :         blob.length = blob_length;
    1378             : 
    1379           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1380           0 :                 allow_remaining = true;
    1381             :         }
    1382             : 
    1383           0 :         if (allow_remaining) {
    1384           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1385             :         } else {
    1386           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1387             :         }
    1388           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1389           0 :                 PyErr_SetNdrError(err);
    1390           0 :                 return NULL;
    1391             :         }
    1392             : 
    1393           0 :         Py_RETURN_NONE;
    1394             : }
    1395             : 
    1396           0 : static PyObject *py_netr_AcctLockStr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1397             : {
    1398           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1399             :         PyObject *ret;
    1400             :         char *retstr;
    1401             : 
    1402           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_AcctLockStr, "netr_AcctLockStr", object);
    1403           0 :         ret = PyUnicode_FromString(retstr);
    1404           0 :         talloc_free(retstr);
    1405             : 
    1406           0 :         return ret;
    1407             : }
    1408             : 
    1409             : static PyMethodDef py_netr_AcctLockStr_methods[] = {
    1410             :         { "__ndr_pack__", (PyCFunction)py_netr_AcctLockStr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1411             :         { "__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" },
    1412             :         { "__ndr_print__", (PyCFunction)py_netr_AcctLockStr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1413             :         { NULL, NULL, 0, NULL }
    1414             : };
    1415             : 
    1416             : 
    1417             : static PyTypeObject netr_AcctLockStr_Type = {
    1418             :         PyVarObject_HEAD_INIT(NULL, 0)
    1419             :         .tp_name = "netlogon.netr_AcctLockStr",
    1420             :         .tp_getset = py_netr_AcctLockStr_getsetters,
    1421             :         .tp_methods = py_netr_AcctLockStr_methods,
    1422             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1423             :         .tp_new = py_netr_AcctLockStr_new,
    1424             : };
    1425             : 
    1426             : 
    1427          19 : static PyObject *py_netr_IdentityInfo_get_domain_name(PyObject *obj, void *closure)
    1428             : {
    1429          19 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1430             :         PyObject *py_domain_name;
    1431          19 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    1432          19 :         return py_domain_name;
    1433             : }
    1434             : 
    1435           0 : static int py_netr_IdentityInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    1436             : {
    1437           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1438           0 :         if (value == NULL) {
    1439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
    1440           0 :                 return -1;
    1441             :         }
    1442           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1443           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1444           0 :                 PyErr_NoMemory();
    1445           0 :                 return -1;
    1446             :         }
    1447           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1448           0 :         return 0;
    1449             : }
    1450             : 
    1451           0 : static PyObject *py_netr_IdentityInfo_get_parameter_control(PyObject *obj, void *closure)
    1452             : {
    1453           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1454             :         PyObject *py_parameter_control;
    1455           0 :         py_parameter_control = PyLong_FromUnsignedLongLong((uint32_t)object->parameter_control);
    1456           0 :         return py_parameter_control;
    1457             : }
    1458             : 
    1459           3 : static int py_netr_IdentityInfo_set_parameter_control(PyObject *py_obj, PyObject *value, void *closure)
    1460             : {
    1461           3 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1462           3 :         if (value == NULL) {
    1463           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parameter_control");
    1464           0 :                 return -1;
    1465             :         }
    1466             :         {
    1467           3 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parameter_control));
    1468           3 :                 if (PyLong_Check(value)) {
    1469             :                         unsigned long long test_var;
    1470           3 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1471           3 :                         if (PyErr_Occurred() != NULL) {
    1472           0 :                                 return -1;
    1473             :                         }
    1474           3 :                         if (test_var > uint_max) {
    1475           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1476             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1477           0 :                                 return -1;
    1478             :                         }
    1479           3 :                         object->parameter_control = test_var;
    1480             :                 } else {
    1481           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1482             :                           PyLong_Type.tp_name);
    1483           0 :                         return -1;
    1484             :                 }
    1485             :         }
    1486           3 :         return 0;
    1487             : }
    1488             : 
    1489           0 : static PyObject *py_netr_IdentityInfo_get_logon_id(PyObject *obj, void *closure)
    1490             : {
    1491           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1492             :         PyObject *py_logon_id;
    1493           0 :         py_logon_id = PyLong_FromUnsignedLongLong(object->logon_id);
    1494           0 :         return py_logon_id;
    1495             : }
    1496             : 
    1497           0 : static int py_netr_IdentityInfo_set_logon_id(PyObject *py_obj, PyObject *value, void *closure)
    1498             : {
    1499           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1500           0 :         if (value == NULL) {
    1501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_id");
    1502           0 :                 return -1;
    1503             :         }
    1504             :         {
    1505           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_id));
    1506           0 :                 if (PyLong_Check(value)) {
    1507             :                         unsigned long long test_var;
    1508           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1509           0 :                         if (PyErr_Occurred() != NULL) {
    1510           0 :                                 return -1;
    1511             :                         }
    1512           0 :                         if (test_var > uint_max) {
    1513           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1514             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1515           0 :                                 return -1;
    1516             :                         }
    1517           0 :                         object->logon_id = test_var;
    1518             :                 } else {
    1519           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1520             :                           PyLong_Type.tp_name);
    1521           0 :                         return -1;
    1522             :                 }
    1523             :         }
    1524           0 :         return 0;
    1525             : }
    1526             : 
    1527          19 : static PyObject *py_netr_IdentityInfo_get_account_name(PyObject *obj, void *closure)
    1528             : {
    1529          19 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1530             :         PyObject *py_account_name;
    1531          19 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    1532          19 :         return py_account_name;
    1533             : }
    1534             : 
    1535           0 : static int py_netr_IdentityInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    1536             : {
    1537           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1538           0 :         if (value == NULL) {
    1539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    1540           0 :                 return -1;
    1541             :         }
    1542           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1543           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1544           0 :                 PyErr_NoMemory();
    1545           0 :                 return -1;
    1546             :         }
    1547           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1548           0 :         return 0;
    1549             : }
    1550             : 
    1551          19 : static PyObject *py_netr_IdentityInfo_get_workstation(PyObject *obj, void *closure)
    1552             : {
    1553          19 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1554             :         PyObject *py_workstation;
    1555          19 :         py_workstation = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstation);
    1556          19 :         return py_workstation;
    1557             : }
    1558             : 
    1559           0 : static int py_netr_IdentityInfo_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
    1560             : {
    1561           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1562           0 :         if (value == NULL) {
    1563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstation");
    1564           0 :                 return -1;
    1565             :         }
    1566           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1567           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1568           0 :                 PyErr_NoMemory();
    1569           0 :                 return -1;
    1570             :         }
    1571           0 :         object->workstation = *(struct lsa_String *)pytalloc_get_ptr(value);
    1572           0 :         return 0;
    1573             : }
    1574             : 
    1575             : static PyGetSetDef py_netr_IdentityInfo_getsetters[] = {
    1576             :         {
    1577             :                 .name = discard_const_p(char, "domain_name"),
    1578             :                 .get = py_netr_IdentityInfo_get_domain_name,
    1579             :                 .set = py_netr_IdentityInfo_set_domain_name,
    1580             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1581             :         },
    1582             :         {
    1583             :                 .name = discard_const_p(char, "parameter_control"),
    1584             :                 .get = py_netr_IdentityInfo_get_parameter_control,
    1585             :                 .set = py_netr_IdentityInfo_set_parameter_control,
    1586             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonParameterControl")
    1587             :         },
    1588             :         {
    1589             :                 .name = discard_const_p(char, "logon_id"),
    1590             :                 .get = py_netr_IdentityInfo_get_logon_id,
    1591             :                 .set = py_netr_IdentityInfo_set_logon_id,
    1592             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1593             :         },
    1594             :         {
    1595             :                 .name = discard_const_p(char, "account_name"),
    1596             :                 .get = py_netr_IdentityInfo_get_account_name,
    1597             :                 .set = py_netr_IdentityInfo_set_account_name,
    1598             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1599             :         },
    1600             :         {
    1601             :                 .name = discard_const_p(char, "workstation"),
    1602             :                 .get = py_netr_IdentityInfo_get_workstation,
    1603             :                 .set = py_netr_IdentityInfo_set_workstation,
    1604             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1605             :         },
    1606             :         { .name = NULL }
    1607             : };
    1608             : 
    1609          19 : static PyObject *py_netr_IdentityInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1610             : {
    1611          19 :         return pytalloc_new(struct netr_IdentityInfo, type);
    1612             : }
    1613             : 
    1614             : 
    1615             : static PyTypeObject netr_IdentityInfo_Type = {
    1616             :         PyVarObject_HEAD_INIT(NULL, 0)
    1617             :         .tp_name = "netlogon.netr_IdentityInfo",
    1618             :         .tp_getset = py_netr_IdentityInfo_getsetters,
    1619             :         .tp_methods = NULL,
    1620             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1621             :         .tp_new = py_netr_IdentityInfo_new,
    1622             : };
    1623             : 
    1624             : 
    1625           0 : static PyObject *py_netr_PasswordInfo_get_identity_info(PyObject *obj, void *closure)
    1626             : {
    1627           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1628             :         PyObject *py_identity_info;
    1629           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1630           0 :         return py_identity_info;
    1631             : }
    1632             : 
    1633           0 : static int py_netr_PasswordInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1634             : {
    1635           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1636           0 :         if (value == NULL) {
    1637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    1638           0 :                 return -1;
    1639             :         }
    1640           0 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1641           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1642           0 :                 PyErr_NoMemory();
    1643           0 :                 return -1;
    1644             :         }
    1645           0 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1646           0 :         return 0;
    1647             : }
    1648             : 
    1649           0 : static PyObject *py_netr_PasswordInfo_get_lmpassword(PyObject *obj, void *closure)
    1650             : {
    1651           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1652             :         PyObject *py_lmpassword;
    1653           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    1654           0 :         return py_lmpassword;
    1655             : }
    1656             : 
    1657           0 : static int py_netr_PasswordInfo_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    1658             : {
    1659           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1660           0 :         if (value == NULL) {
    1661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    1662           0 :                 return -1;
    1663             :         }
    1664           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1665           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1666           0 :                 PyErr_NoMemory();
    1667           0 :                 return -1;
    1668             :         }
    1669           0 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1670           0 :         return 0;
    1671             : }
    1672             : 
    1673           0 : static PyObject *py_netr_PasswordInfo_get_ntpassword(PyObject *obj, void *closure)
    1674             : {
    1675           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1676             :         PyObject *py_ntpassword;
    1677           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    1678           0 :         return py_ntpassword;
    1679             : }
    1680             : 
    1681           0 : static int py_netr_PasswordInfo_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    1682             : {
    1683           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1684           0 :         if (value == NULL) {
    1685           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    1686           0 :                 return -1;
    1687             :         }
    1688           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1689           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1690           0 :                 PyErr_NoMemory();
    1691           0 :                 return -1;
    1692             :         }
    1693           0 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1694           0 :         return 0;
    1695             : }
    1696             : 
    1697             : static PyGetSetDef py_netr_PasswordInfo_getsetters[] = {
    1698             :         {
    1699             :                 .name = discard_const_p(char, "identity_info"),
    1700             :                 .get = py_netr_PasswordInfo_get_identity_info,
    1701             :                 .set = py_netr_PasswordInfo_set_identity_info,
    1702             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    1703             :         },
    1704             :         {
    1705             :                 .name = discard_const_p(char, "lmpassword"),
    1706             :                 .get = py_netr_PasswordInfo_get_lmpassword,
    1707             :                 .set = py_netr_PasswordInfo_set_lmpassword,
    1708             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1709             :         },
    1710             :         {
    1711             :                 .name = discard_const_p(char, "ntpassword"),
    1712             :                 .get = py_netr_PasswordInfo_get_ntpassword,
    1713             :                 .set = py_netr_PasswordInfo_set_ntpassword,
    1714             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1715             :         },
    1716             :         { .name = NULL }
    1717             : };
    1718             : 
    1719           0 : static PyObject *py_netr_PasswordInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1720             : {
    1721           0 :         return pytalloc_new(struct netr_PasswordInfo, type);
    1722             : }
    1723             : 
    1724             : 
    1725             : static PyTypeObject netr_PasswordInfo_Type = {
    1726             :         PyVarObject_HEAD_INIT(NULL, 0)
    1727             :         .tp_name = "netlogon.netr_PasswordInfo",
    1728             :         .tp_getset = py_netr_PasswordInfo_getsetters,
    1729             :         .tp_methods = NULL,
    1730             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1731             :         .tp_new = py_netr_PasswordInfo_new,
    1732             : };
    1733             : 
    1734             : 
    1735           0 : static PyObject *py_netr_ChallengeResponse_get_length(PyObject *obj, void *closure)
    1736             : {
    1737           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1738             :         PyObject *py_length;
    1739           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
    1740           0 :         return py_length;
    1741             : }
    1742             : 
    1743          19 : static int py_netr_ChallengeResponse_set_length(PyObject *py_obj, PyObject *value, void *closure)
    1744             : {
    1745          19 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1746          19 :         if (value == NULL) {
    1747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    1748           0 :                 return -1;
    1749             :         }
    1750             :         {
    1751          19 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    1752          19 :                 if (PyLong_Check(value)) {
    1753             :                         unsigned long long test_var;
    1754          19 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1755          19 :                         if (PyErr_Occurred() != NULL) {
    1756           0 :                                 return -1;
    1757             :                         }
    1758          19 :                         if (test_var > uint_max) {
    1759           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1760             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1761           0 :                                 return -1;
    1762             :                         }
    1763          19 :                         object->length = test_var;
    1764             :                 } else {
    1765           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1766             :                           PyLong_Type.tp_name);
    1767           0 :                         return -1;
    1768             :                 }
    1769             :         }
    1770          19 :         return 0;
    1771             : }
    1772             : 
    1773           0 : static PyObject *py_netr_ChallengeResponse_get_size(PyObject *obj, void *closure)
    1774             : {
    1775           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1776             :         PyObject *py_size;
    1777           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
    1778           0 :         return py_size;
    1779             : }
    1780             : 
    1781           0 : static int py_netr_ChallengeResponse_set_size(PyObject *py_obj, PyObject *value, void *closure)
    1782             : {
    1783           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1784           0 :         if (value == NULL) {
    1785           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    1786           0 :                 return -1;
    1787             :         }
    1788             :         {
    1789           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    1790           0 :                 if (PyLong_Check(value)) {
    1791             :                         unsigned long long test_var;
    1792           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1793           0 :                         if (PyErr_Occurred() != NULL) {
    1794           0 :                                 return -1;
    1795             :                         }
    1796           0 :                         if (test_var > uint_max) {
    1797           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1798             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1799           0 :                                 return -1;
    1800             :                         }
    1801           0 :                         object->size = test_var;
    1802             :                 } else {
    1803           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1804             :                           PyLong_Type.tp_name);
    1805           0 :                         return -1;
    1806             :                 }
    1807             :         }
    1808           0 :         return 0;
    1809             : }
    1810             : 
    1811           0 : static PyObject *py_netr_ChallengeResponse_get_data(PyObject *obj, void *closure)
    1812             : {
    1813           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1814             :         PyObject *py_data;
    1815           0 :         if (object->data == NULL) {
    1816           0 :                 Py_RETURN_NONE;
    1817             :         }
    1818           0 :         if (object->data == NULL) {
    1819           0 :                 py_data = Py_None;
    1820           0 :                 Py_INCREF(py_data);
    1821             :         } else {
    1822           0 :                 py_data = PyList_New(object->length);
    1823           0 :                 if (py_data == NULL) {
    1824           0 :                         return NULL;
    1825             :                 }
    1826             :                 {
    1827             :                         int data_cntr_1;
    1828           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    1829             :                                 PyObject *py_data_1;
    1830           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    1831           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    1832             :                         }
    1833             :                 }
    1834             :         }
    1835           0 :         return py_data;
    1836             : }
    1837             : 
    1838          19 : static int py_netr_ChallengeResponse_set_data(PyObject *py_obj, PyObject *value, void *closure)
    1839             : {
    1840          19 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1841          19 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    1842          19 :         if (value == NULL) {
    1843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    1844           0 :                 return -1;
    1845             :         }
    1846          19 :         if (value == Py_None) {
    1847           0 :                 object->data = NULL;
    1848             :         } else {
    1849          19 :                 object->data = NULL;
    1850          19 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1851             :                 {
    1852             :                         int data_cntr_1;
    1853          19 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    1854          19 :                         if (!object->data) { return -1;; }
    1855          19 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    1856        1323 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    1857        1304 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    1858           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    1859           0 :                                         return -1;
    1860             :                                 }
    1861             :                                 {
    1862        1304 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    1863        1304 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    1864             :                                                 unsigned long long test_var;
    1865        1304 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    1866        1304 :                                                 if (PyErr_Occurred() != NULL) {
    1867           0 :                                                         return -1;
    1868             :                                                 }
    1869        1304 :                                                 if (test_var > uint_max) {
    1870           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1871             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    1872           0 :                                                         return -1;
    1873             :                                                 }
    1874        1304 :                                                 object->data[data_cntr_1] = test_var;
    1875             :                                         } else {
    1876           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1877             :                                                   PyLong_Type.tp_name);
    1878           0 :                                                 return -1;
    1879             :                                         }
    1880             :                                 }
    1881             :                         }
    1882             :                 }
    1883             :         }
    1884          19 :         return 0;
    1885             : }
    1886             : 
    1887             : static PyGetSetDef py_netr_ChallengeResponse_getsetters[] = {
    1888             :         {
    1889             :                 .name = discard_const_p(char, "length"),
    1890             :                 .get = py_netr_ChallengeResponse_get_length,
    1891             :                 .set = py_netr_ChallengeResponse_set_length,
    1892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1893             :         },
    1894             :         {
    1895             :                 .name = discard_const_p(char, "size"),
    1896             :                 .get = py_netr_ChallengeResponse_get_size,
    1897             :                 .set = py_netr_ChallengeResponse_set_size,
    1898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1899             :         },
    1900             :         {
    1901             :                 .name = discard_const_p(char, "data"),
    1902             :                 .get = py_netr_ChallengeResponse_get_data,
    1903             :                 .set = py_netr_ChallengeResponse_set_data,
    1904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1905             :         },
    1906             :         { .name = NULL }
    1907             : };
    1908             : 
    1909          19 : static PyObject *py_netr_ChallengeResponse_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1910             : {
    1911          19 :         return pytalloc_new(struct netr_ChallengeResponse, type);
    1912             : }
    1913             : 
    1914             : 
    1915             : static PyTypeObject netr_ChallengeResponse_Type = {
    1916             :         PyVarObject_HEAD_INIT(NULL, 0)
    1917             :         .tp_name = "netlogon.netr_ChallengeResponse",
    1918             :         .tp_getset = py_netr_ChallengeResponse_getsetters,
    1919             :         .tp_methods = NULL,
    1920             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1921             :         .tp_new = py_netr_ChallengeResponse_new,
    1922             : };
    1923             : 
    1924             : 
    1925          60 : static PyObject *py_netr_NetworkInfo_get_identity_info(PyObject *obj, void *closure)
    1926             : {
    1927          60 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    1928             :         PyObject *py_identity_info;
    1929          60 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1930          60 :         return py_identity_info;
    1931             : }
    1932             : 
    1933          19 : static int py_netr_NetworkInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1934             : {
    1935          19 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    1936          19 :         if (value == NULL) {
    1937           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    1938           0 :                 return -1;
    1939             :         }
    1940          19 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1941          19 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1942           0 :                 PyErr_NoMemory();
    1943           0 :                 return -1;
    1944             :         }
    1945          19 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1946          19 :         return 0;
    1947             : }
    1948             : 
    1949           0 : static PyObject *py_netr_NetworkInfo_get_challenge(PyObject *obj, void *closure)
    1950             : {
    1951           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    1952             :         PyObject *py_challenge;
    1953           0 :         py_challenge = PyList_New(8);
    1954           0 :         if (py_challenge == NULL) {
    1955           0 :                 return NULL;
    1956             :         }
    1957             :         {
    1958             :                 int challenge_cntr_0;
    1959           0 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < (8); challenge_cntr_0++) {
    1960             :                         PyObject *py_challenge_0;
    1961           0 :                         py_challenge_0 = PyLong_FromLong((uint16_t)object->challenge[challenge_cntr_0]);
    1962           0 :                         PyList_SetItem(py_challenge, challenge_cntr_0, py_challenge_0);
    1963             :                 }
    1964             :         }
    1965           0 :         return py_challenge;
    1966             : }
    1967             : 
    1968          19 : static int py_netr_NetworkInfo_set_challenge(PyObject *py_obj, PyObject *value, void *closure)
    1969             : {
    1970          19 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    1971          19 :         if (value == NULL) {
    1972           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->challenge");
    1973           0 :                 return -1;
    1974             :         }
    1975          19 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1976             :         {
    1977             :                 int challenge_cntr_0;
    1978          19 :                 if (ARRAY_SIZE(object->challenge) != PyList_GET_SIZE(value)) {
    1979           0 :                         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));
    1980           0 :                         return -1;
    1981             :                 }
    1982         171 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < PyList_GET_SIZE(value); challenge_cntr_0++) {
    1983         152 :                         if (PyList_GET_ITEM(value, challenge_cntr_0) == NULL) {
    1984           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->challenge[challenge_cntr_0]");
    1985           0 :                                 return -1;
    1986             :                         }
    1987             :                         {
    1988         152 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->challenge[challenge_cntr_0]));
    1989         152 :                                 if (PyLong_Check(PyList_GET_ITEM(value, challenge_cntr_0))) {
    1990             :                                         unsigned long long test_var;
    1991         152 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, challenge_cntr_0));
    1992         152 :                                         if (PyErr_Occurred() != NULL) {
    1993           0 :                                                 return -1;
    1994             :                                         }
    1995         152 :                                         if (test_var > uint_max) {
    1996           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1997             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    1998           0 :                                                 return -1;
    1999             :                                         }
    2000         152 :                                         object->challenge[challenge_cntr_0] = test_var;
    2001             :                                 } else {
    2002           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2003             :                                           PyLong_Type.tp_name);
    2004           0 :                                         return -1;
    2005             :                                 }
    2006             :                         }
    2007             :                 }
    2008             :         }
    2009          19 :         return 0;
    2010             : }
    2011             : 
    2012          38 : static PyObject *py_netr_NetworkInfo_get_nt(PyObject *obj, void *closure)
    2013             : {
    2014          38 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    2015             :         PyObject *py_nt;
    2016          38 :         py_nt = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->nt);
    2017          38 :         return py_nt;
    2018             : }
    2019             : 
    2020          19 : static int py_netr_NetworkInfo_set_nt(PyObject *py_obj, PyObject *value, void *closure)
    2021             : {
    2022          19 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    2023          19 :         if (value == NULL) {
    2024           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt");
    2025           0 :                 return -1;
    2026             :         }
    2027          19 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2028          19 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2029           0 :                 PyErr_NoMemory();
    2030           0 :                 return -1;
    2031             :         }
    2032          19 :         object->nt = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2033          19 :         return 0;
    2034             : }
    2035             : 
    2036           0 : static PyObject *py_netr_NetworkInfo_get_lm(PyObject *obj, void *closure)
    2037             : {
    2038           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    2039             :         PyObject *py_lm;
    2040           0 :         py_lm = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->lm);
    2041           0 :         return py_lm;
    2042             : }
    2043             : 
    2044           0 : static int py_netr_NetworkInfo_set_lm(PyObject *py_obj, PyObject *value, void *closure)
    2045             : {
    2046           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    2047           0 :         if (value == NULL) {
    2048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm");
    2049           0 :                 return -1;
    2050             :         }
    2051           0 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2052           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2053           0 :                 PyErr_NoMemory();
    2054           0 :                 return -1;
    2055             :         }
    2056           0 :         object->lm = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2057           0 :         return 0;
    2058             : }
    2059             : 
    2060             : static PyGetSetDef py_netr_NetworkInfo_getsetters[] = {
    2061             :         {
    2062             :                 .name = discard_const_p(char, "identity_info"),
    2063             :                 .get = py_netr_NetworkInfo_get_identity_info,
    2064             :                 .set = py_netr_NetworkInfo_set_identity_info,
    2065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2066             :         },
    2067             :         {
    2068             :                 .name = discard_const_p(char, "challenge"),
    2069             :                 .get = py_netr_NetworkInfo_get_challenge,
    2070             :                 .set = py_netr_NetworkInfo_set_challenge,
    2071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2072             :         },
    2073             :         {
    2074             :                 .name = discard_const_p(char, "nt"),
    2075             :                 .get = py_netr_NetworkInfo_get_nt,
    2076             :                 .set = py_netr_NetworkInfo_set_nt,
    2077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2078             :         },
    2079             :         {
    2080             :                 .name = discard_const_p(char, "lm"),
    2081             :                 .get = py_netr_NetworkInfo_get_lm,
    2082             :                 .set = py_netr_NetworkInfo_set_lm,
    2083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2084             :         },
    2085             :         { .name = NULL }
    2086             : };
    2087             : 
    2088          19 : static PyObject *py_netr_NetworkInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2089             : {
    2090          19 :         return pytalloc_new(struct netr_NetworkInfo, type);
    2091             : }
    2092             : 
    2093             : 
    2094             : static PyTypeObject netr_NetworkInfo_Type = {
    2095             :         PyVarObject_HEAD_INIT(NULL, 0)
    2096             :         .tp_name = "netlogon.netr_NetworkInfo",
    2097             :         .tp_getset = py_netr_NetworkInfo_getsetters,
    2098             :         .tp_methods = NULL,
    2099             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2100             :         .tp_new = py_netr_NetworkInfo_new,
    2101             : };
    2102             : 
    2103             : 
    2104           0 : static PyObject *py_netr_GenericInfo_get_identity_info(PyObject *obj, void *closure)
    2105             : {
    2106           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2107             :         PyObject *py_identity_info;
    2108           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    2109           0 :         return py_identity_info;
    2110             : }
    2111             : 
    2112           0 : static int py_netr_GenericInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    2113             : {
    2114           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2115           0 :         if (value == NULL) {
    2116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    2117           0 :                 return -1;
    2118             :         }
    2119           0 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    2120           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2121           0 :                 PyErr_NoMemory();
    2122           0 :                 return -1;
    2123             :         }
    2124           0 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    2125           0 :         return 0;
    2126             : }
    2127             : 
    2128           0 : static PyObject *py_netr_GenericInfo_get_package_name(PyObject *obj, void *closure)
    2129             : {
    2130           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2131             :         PyObject *py_package_name;
    2132           0 :         py_package_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->package_name);
    2133           0 :         return py_package_name;
    2134             : }
    2135             : 
    2136           0 : static int py_netr_GenericInfo_set_package_name(PyObject *py_obj, PyObject *value, void *closure)
    2137             : {
    2138           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2139           0 :         if (value == NULL) {
    2140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->package_name");
    2141           0 :                 return -1;
    2142             :         }
    2143           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    2144           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2145           0 :                 PyErr_NoMemory();
    2146           0 :                 return -1;
    2147             :         }
    2148           0 :         object->package_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    2149           0 :         return 0;
    2150             : }
    2151             : 
    2152           0 : static PyObject *py_netr_GenericInfo_get_length(PyObject *obj, void *closure)
    2153             : {
    2154           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2155             :         PyObject *py_length;
    2156           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
    2157           0 :         return py_length;
    2158             : }
    2159             : 
    2160           0 : static int py_netr_GenericInfo_set_length(PyObject *py_obj, PyObject *value, void *closure)
    2161             : {
    2162           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2163           0 :         if (value == NULL) {
    2164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    2165           0 :                 return -1;
    2166             :         }
    2167             :         {
    2168           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    2169           0 :                 if (PyLong_Check(value)) {
    2170             :                         unsigned long long test_var;
    2171           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2172           0 :                         if (PyErr_Occurred() != NULL) {
    2173           0 :                                 return -1;
    2174             :                         }
    2175           0 :                         if (test_var > uint_max) {
    2176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2177             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2178           0 :                                 return -1;
    2179             :                         }
    2180           0 :                         object->length = test_var;
    2181             :                 } else {
    2182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2183             :                           PyLong_Type.tp_name);
    2184           0 :                         return -1;
    2185             :                 }
    2186             :         }
    2187           0 :         return 0;
    2188             : }
    2189             : 
    2190           0 : static PyObject *py_netr_GenericInfo_get_data(PyObject *obj, void *closure)
    2191             : {
    2192           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2193             :         PyObject *py_data;
    2194           0 :         if (object->data == NULL) {
    2195           0 :                 Py_RETURN_NONE;
    2196             :         }
    2197           0 :         if (object->data == NULL) {
    2198           0 :                 py_data = Py_None;
    2199           0 :                 Py_INCREF(py_data);
    2200             :         } else {
    2201           0 :                 py_data = PyList_New(object->length);
    2202           0 :                 if (py_data == NULL) {
    2203           0 :                         return NULL;
    2204             :                 }
    2205             :                 {
    2206             :                         int data_cntr_1;
    2207           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    2208             :                                 PyObject *py_data_1;
    2209           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    2210           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    2211             :                         }
    2212             :                 }
    2213             :         }
    2214           0 :         return py_data;
    2215             : }
    2216             : 
    2217           0 : static int py_netr_GenericInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
    2218             : {
    2219           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2220           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    2221           0 :         if (value == NULL) {
    2222           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    2223           0 :                 return -1;
    2224             :         }
    2225           0 :         if (value == Py_None) {
    2226           0 :                 object->data = NULL;
    2227             :         } else {
    2228           0 :                 object->data = NULL;
    2229           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2230             :                 {
    2231             :                         int data_cntr_1;
    2232           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    2233           0 :                         if (!object->data) { return -1;; }
    2234           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    2235           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    2236           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    2237           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    2238           0 :                                         return -1;
    2239             :                                 }
    2240             :                                 {
    2241           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    2242           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    2243             :                                                 unsigned long long test_var;
    2244           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    2245           0 :                                                 if (PyErr_Occurred() != NULL) {
    2246           0 :                                                         return -1;
    2247             :                                                 }
    2248           0 :                                                 if (test_var > uint_max) {
    2249           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2250             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    2251           0 :                                                         return -1;
    2252             :                                                 }
    2253           0 :                                                 object->data[data_cntr_1] = test_var;
    2254             :                                         } else {
    2255           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2256             :                                                   PyLong_Type.tp_name);
    2257           0 :                                                 return -1;
    2258             :                                         }
    2259             :                                 }
    2260             :                         }
    2261             :                 }
    2262             :         }
    2263           0 :         return 0;
    2264             : }
    2265             : 
    2266             : static PyGetSetDef py_netr_GenericInfo_getsetters[] = {
    2267             :         {
    2268             :                 .name = discard_const_p(char, "identity_info"),
    2269             :                 .get = py_netr_GenericInfo_get_identity_info,
    2270             :                 .set = py_netr_GenericInfo_set_identity_info,
    2271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2272             :         },
    2273             :         {
    2274             :                 .name = discard_const_p(char, "package_name"),
    2275             :                 .get = py_netr_GenericInfo_get_package_name,
    2276             :                 .set = py_netr_GenericInfo_set_package_name,
    2277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    2278             :         },
    2279             :         {
    2280             :                 .name = discard_const_p(char, "length"),
    2281             :                 .get = py_netr_GenericInfo_get_length,
    2282             :                 .set = py_netr_GenericInfo_set_length,
    2283             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2284             :         },
    2285             :         {
    2286             :                 .name = discard_const_p(char, "data"),
    2287             :                 .get = py_netr_GenericInfo_get_data,
    2288             :                 .set = py_netr_GenericInfo_set_data,
    2289             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2290             :         },
    2291             :         { .name = NULL }
    2292             : };
    2293             : 
    2294           0 : static PyObject *py_netr_GenericInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2295             : {
    2296           0 :         return pytalloc_new(struct netr_GenericInfo, type);
    2297             : }
    2298             : 
    2299             : 
    2300             : static PyTypeObject netr_GenericInfo_Type = {
    2301             :         PyVarObject_HEAD_INIT(NULL, 0)
    2302             :         .tp_name = "netlogon.netr_GenericInfo",
    2303             :         .tp_getset = py_netr_GenericInfo_getsetters,
    2304             :         .tp_methods = NULL,
    2305             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2306             :         .tp_new = py_netr_GenericInfo_new,
    2307             : };
    2308             : 
    2309           0 : static PyObject *py_import_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, union netr_LogonLevel *in)
    2310             : {
    2311             :         PyObject *ret;
    2312             : 
    2313           0 :         switch (level) {
    2314           0 :                 case NetlogonInteractiveInformation:
    2315           0 :                         if (in->password == NULL) {
    2316           0 :                                 ret = Py_None;
    2317           0 :                                 Py_INCREF(ret);
    2318             :                         } else {
    2319           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2320             :                         }
    2321           0 :                         return ret;
    2322             : 
    2323           0 :                 case NetlogonNetworkInformation:
    2324           0 :                         if (in->network == NULL) {
    2325           0 :                                 ret = Py_None;
    2326           0 :                                 Py_INCREF(ret);
    2327             :                         } else {
    2328           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2329             :                         }
    2330           0 :                         return ret;
    2331             : 
    2332           0 :                 case NetlogonServiceInformation:
    2333           0 :                         if (in->password == NULL) {
    2334           0 :                                 ret = Py_None;
    2335           0 :                                 Py_INCREF(ret);
    2336             :                         } else {
    2337           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2338             :                         }
    2339           0 :                         return ret;
    2340             : 
    2341           0 :                 case NetlogonGenericInformation:
    2342           0 :                         if (in->generic == NULL) {
    2343           0 :                                 ret = Py_None;
    2344           0 :                                 Py_INCREF(ret);
    2345             :                         } else {
    2346           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo_Type, in->generic, in->generic);
    2347             :                         }
    2348           0 :                         return ret;
    2349             : 
    2350           0 :                 case NetlogonInteractiveTransitiveInformation:
    2351           0 :                         if (in->password == NULL) {
    2352           0 :                                 ret = Py_None;
    2353           0 :                                 Py_INCREF(ret);
    2354             :                         } else {
    2355           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2356             :                         }
    2357           0 :                         return ret;
    2358             : 
    2359           0 :                 case NetlogonNetworkTransitiveInformation:
    2360           0 :                         if (in->network == NULL) {
    2361           0 :                                 ret = Py_None;
    2362           0 :                                 Py_INCREF(ret);
    2363             :                         } else {
    2364           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2365             :                         }
    2366           0 :                         return ret;
    2367             : 
    2368           0 :                 case NetlogonServiceTransitiveInformation:
    2369           0 :                         if (in->password == NULL) {
    2370           0 :                                 ret = Py_None;
    2371           0 :                                 Py_INCREF(ret);
    2372             :                         } else {
    2373           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2374             :                         }
    2375           0 :                         return ret;
    2376             : 
    2377           0 :                 default:
    2378           0 :                         ret = Py_None;
    2379           0 :                         Py_INCREF(ret);
    2380           0 :                         return ret;
    2381             : 
    2382             :         }
    2383             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    2384             :         return NULL;
    2385             : }
    2386             : 
    2387          19 : static union netr_LogonLevel *py_export_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    2388             : {
    2389          19 :         union netr_LogonLevel *ret = talloc_zero(mem_ctx, union netr_LogonLevel);
    2390          19 :         switch (level) {
    2391           0 :                 case NetlogonInteractiveInformation:
    2392           0 :                         if (in == NULL) {
    2393           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2394           0 :                                 talloc_free(ret); return NULL;
    2395             :                         }
    2396           0 :                         if (in == Py_None) {
    2397           0 :                                 ret->password = NULL;
    2398             :                         } else {
    2399           0 :                                 ret->password = NULL;
    2400           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2401           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2402           0 :                                         PyErr_NoMemory();
    2403           0 :                                         talloc_free(ret); return NULL;
    2404             :                                 }
    2405           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2406             :                         }
    2407           0 :                         break;
    2408             : 
    2409           0 :                 case NetlogonNetworkInformation:
    2410           0 :                         if (in == NULL) {
    2411           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->network");
    2412           0 :                                 talloc_free(ret); return NULL;
    2413             :                         }
    2414           0 :                         if (in == Py_None) {
    2415           0 :                                 ret->network = NULL;
    2416             :                         } else {
    2417           0 :                                 ret->network = NULL;
    2418           0 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2419           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2420           0 :                                         PyErr_NoMemory();
    2421           0 :                                         talloc_free(ret); return NULL;
    2422             :                                 }
    2423           0 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2424             :                         }
    2425           0 :                         break;
    2426             : 
    2427           0 :                 case NetlogonServiceInformation:
    2428           0 :                         if (in == NULL) {
    2429           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2430           0 :                                 talloc_free(ret); return NULL;
    2431             :                         }
    2432           0 :                         if (in == Py_None) {
    2433           0 :                                 ret->password = NULL;
    2434             :                         } else {
    2435           0 :                                 ret->password = NULL;
    2436           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2437           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2438           0 :                                         PyErr_NoMemory();
    2439           0 :                                         talloc_free(ret); return NULL;
    2440             :                                 }
    2441           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2442             :                         }
    2443           0 :                         break;
    2444             : 
    2445           0 :                 case NetlogonGenericInformation:
    2446           0 :                         if (in == NULL) {
    2447           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->generic");
    2448           0 :                                 talloc_free(ret); return NULL;
    2449             :                         }
    2450           0 :                         if (in == Py_None) {
    2451           0 :                                 ret->generic = NULL;
    2452             :                         } else {
    2453           0 :                                 ret->generic = NULL;
    2454           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo_Type, in, talloc_free(ret); return NULL;);
    2455           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2456           0 :                                         PyErr_NoMemory();
    2457           0 :                                         talloc_free(ret); return NULL;
    2458             :                                 }
    2459           0 :                                 ret->generic = (struct netr_GenericInfo *)pytalloc_get_ptr(in);
    2460             :                         }
    2461           0 :                         break;
    2462             : 
    2463           0 :                 case NetlogonInteractiveTransitiveInformation:
    2464           0 :                         if (in == NULL) {
    2465           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2466           0 :                                 talloc_free(ret); return NULL;
    2467             :                         }
    2468           0 :                         if (in == Py_None) {
    2469           0 :                                 ret->password = NULL;
    2470             :                         } else {
    2471           0 :                                 ret->password = NULL;
    2472           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2473           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2474           0 :                                         PyErr_NoMemory();
    2475           0 :                                         talloc_free(ret); return NULL;
    2476             :                                 }
    2477           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2478             :                         }
    2479           0 :                         break;
    2480             : 
    2481          19 :                 case NetlogonNetworkTransitiveInformation:
    2482          19 :                         if (in == NULL) {
    2483           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->network");
    2484           0 :                                 talloc_free(ret); return NULL;
    2485             :                         }
    2486          19 :                         if (in == Py_None) {
    2487           0 :                                 ret->network = NULL;
    2488             :                         } else {
    2489          19 :                                 ret->network = NULL;
    2490          19 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2491          19 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2492           0 :                                         PyErr_NoMemory();
    2493           0 :                                         talloc_free(ret); return NULL;
    2494             :                                 }
    2495          19 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2496             :                         }
    2497          19 :                         break;
    2498             : 
    2499           0 :                 case NetlogonServiceTransitiveInformation:
    2500           0 :                         if (in == NULL) {
    2501           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2502           0 :                                 talloc_free(ret); return NULL;
    2503             :                         }
    2504           0 :                         if (in == Py_None) {
    2505           0 :                                 ret->password = NULL;
    2506             :                         } else {
    2507           0 :                                 ret->password = NULL;
    2508           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2509           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2510           0 :                                         PyErr_NoMemory();
    2511           0 :                                         talloc_free(ret); return NULL;
    2512             :                                 }
    2513           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2514             :                         }
    2515           0 :                         break;
    2516             : 
    2517           0 :                 default:
    2518           0 :                         break;
    2519             : 
    2520             :         }
    2521             : 
    2522          19 :         return ret;
    2523             : }
    2524             : 
    2525           0 : static PyObject *py_netr_LogonLevel_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2526             : {
    2527           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2528           0 :         PyObject *mem_ctx_obj = NULL;
    2529           0 :         TALLOC_CTX *mem_ctx = NULL;
    2530           0 :         int level = 0;
    2531           0 :         PyObject *in_obj = NULL;
    2532           0 :         union netr_LogonLevel *in = NULL;
    2533             : 
    2534           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2535             :                 discard_const_p(char *, kwnames),
    2536             :                 &mem_ctx_obj,
    2537             :                 &level,
    2538             :                 &in_obj)) {
    2539           0 :                 return NULL;
    2540             :         }
    2541           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2542           0 :         if (mem_ctx == NULL) {
    2543           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2544           0 :                 return NULL;
    2545             :         }
    2546           0 :         in = (union netr_LogonLevel *)pytalloc_get_ptr(in_obj);
    2547           0 :         if (in == NULL) {
    2548           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_LogonLevel!");
    2549           0 :                 return NULL;
    2550             :         }
    2551             : 
    2552           0 :         return py_import_netr_LogonLevel(mem_ctx, level, in);
    2553             : }
    2554             : 
    2555          19 : static PyObject *py_netr_LogonLevel_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2556             : {
    2557          19 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2558          19 :         PyObject *mem_ctx_obj = NULL;
    2559          19 :         TALLOC_CTX *mem_ctx = NULL;
    2560          19 :         int level = 0;
    2561          19 :         PyObject *in = NULL;
    2562          19 :         union netr_LogonLevel *out = NULL;
    2563             : 
    2564          19 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2565             :                 discard_const_p(char *, kwnames),
    2566             :                 &mem_ctx_obj,
    2567             :                 &level,
    2568             :                 &in)) {
    2569           0 :                 return NULL;
    2570             :         }
    2571          19 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2572          19 :         if (mem_ctx == NULL) {
    2573           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2574           0 :                 return NULL;
    2575             :         }
    2576             : 
    2577          19 :         out = py_export_netr_LogonLevel(mem_ctx, level, in);
    2578          19 :         if (out == NULL) {
    2579           0 :                 return NULL;
    2580             :         }
    2581             : 
    2582          19 :         return pytalloc_GenericObject_reference(out);
    2583             : }
    2584             : 
    2585             : static PyMethodDef py_netr_LogonLevel_methods[] = {
    2586             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_import),
    2587             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2588             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2589             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_export),
    2590             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2591             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2592             :         { NULL, NULL, 0, NULL }
    2593             : };
    2594             : 
    2595           0 : static PyObject *py_netr_LogonLevel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2596             : {
    2597           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2598           0 :         return NULL;
    2599             : }
    2600             : 
    2601             : 
    2602             : static PyTypeObject netr_LogonLevel_Type = {
    2603             :         PyVarObject_HEAD_INIT(NULL, 0)
    2604             :         .tp_name = "netlogon.netr_LogonLevel",
    2605             :         .tp_getset = NULL,
    2606             :         .tp_methods = py_netr_LogonLevel_methods,
    2607             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2608             :         .tp_new = py_netr_LogonLevel_new,
    2609             : };
    2610             : 
    2611             : 
    2612           0 : static PyObject *py_netr_UserSessionKey_get_key(PyObject *obj, void *closure)
    2613             : {
    2614           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(obj);
    2615             :         PyObject *py_key;
    2616           0 :         py_key = PyList_New(16);
    2617           0 :         if (py_key == NULL) {
    2618           0 :                 return NULL;
    2619             :         }
    2620             :         {
    2621             :                 int key_cntr_0;
    2622           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (16); key_cntr_0++) {
    2623             :                         PyObject *py_key_0;
    2624           0 :                         py_key_0 = PyLong_FromLong((uint16_t)object->key[key_cntr_0]);
    2625           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2626             :                 }
    2627             :         }
    2628           0 :         return py_key;
    2629             : }
    2630             : 
    2631           0 : static int py_netr_UserSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2632             : {
    2633           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2634           0 :         if (value == NULL) {
    2635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    2636           0 :                 return -1;
    2637             :         }
    2638           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2639             :         {
    2640             :                 int key_cntr_0;
    2641           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2642           0 :                         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));
    2643           0 :                         return -1;
    2644             :                 }
    2645           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2646           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2647           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key[key_cntr_0]");
    2648           0 :                                 return -1;
    2649             :                         }
    2650             :                         {
    2651           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->key[key_cntr_0]));
    2652           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2653             :                                         unsigned long long test_var;
    2654           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2655           0 :                                         if (PyErr_Occurred() != NULL) {
    2656           0 :                                                 return -1;
    2657             :                                         }
    2658           0 :                                         if (test_var > uint_max) {
    2659           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2660             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2661           0 :                                                 return -1;
    2662             :                                         }
    2663           0 :                                         object->key[key_cntr_0] = test_var;
    2664             :                                 } else {
    2665           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2666             :                                           PyLong_Type.tp_name);
    2667           0 :                                         return -1;
    2668             :                                 }
    2669             :                         }
    2670             :                 }
    2671             :         }
    2672           0 :         return 0;
    2673             : }
    2674             : 
    2675             : static PyGetSetDef py_netr_UserSessionKey_getsetters[] = {
    2676             :         {
    2677             :                 .name = discard_const_p(char, "key"),
    2678             :                 .get = py_netr_UserSessionKey_get_key,
    2679             :                 .set = py_netr_UserSessionKey_set_key,
    2680             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2681             :         },
    2682             :         { .name = NULL }
    2683             : };
    2684             : 
    2685           0 : static PyObject *py_netr_UserSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2686             : {
    2687           0 :         return pytalloc_new(struct netr_UserSessionKey, type);
    2688             : }
    2689             : 
    2690           0 : static PyObject *py_netr_UserSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2691             : {
    2692           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2693           0 :         PyObject *ret = NULL;
    2694             :         DATA_BLOB blob;
    2695             :         enum ndr_err_code err;
    2696           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2697           0 :         if (tmp_ctx == NULL) {
    2698           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2699           0 :                 return NULL;
    2700             :         }
    2701           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_UserSessionKey);
    2702           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2703           0 :                 TALLOC_FREE(tmp_ctx);
    2704           0 :                 PyErr_SetNdrError(err);
    2705           0 :                 return NULL;
    2706             :         }
    2707             : 
    2708           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2709           0 :         TALLOC_FREE(tmp_ctx);
    2710           0 :         return ret;
    2711             : }
    2712             : 
    2713           0 : static PyObject *py_netr_UserSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2714             : {
    2715           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2716           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2717           0 :         Py_ssize_t blob_length = 0;
    2718             :         enum ndr_err_code err;
    2719           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2720           0 :         PyObject *allow_remaining_obj = NULL;
    2721           0 :         bool allow_remaining = false;
    2722             : 
    2723           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2724             :                 discard_const_p(char *, kwnames),
    2725             :                 &blob.data, &blob_length,
    2726             :                 &allow_remaining_obj)) {
    2727           0 :                 return NULL;
    2728             :         }
    2729           0 :         blob.length = blob_length;
    2730             : 
    2731           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2732           0 :                 allow_remaining = true;
    2733             :         }
    2734             : 
    2735           0 :         if (allow_remaining) {
    2736           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2737             :         } else {
    2738           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2739             :         }
    2740           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2741           0 :                 PyErr_SetNdrError(err);
    2742           0 :                 return NULL;
    2743             :         }
    2744             : 
    2745           0 :         Py_RETURN_NONE;
    2746             : }
    2747             : 
    2748           0 : static PyObject *py_netr_UserSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2749             : {
    2750           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2751             :         PyObject *ret;
    2752             :         char *retstr;
    2753             : 
    2754           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_UserSessionKey, "netr_UserSessionKey", object);
    2755           0 :         ret = PyUnicode_FromString(retstr);
    2756           0 :         talloc_free(retstr);
    2757             : 
    2758           0 :         return ret;
    2759             : }
    2760             : 
    2761             : static PyMethodDef py_netr_UserSessionKey_methods[] = {
    2762             :         { "__ndr_pack__", (PyCFunction)py_netr_UserSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2763             :         { "__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" },
    2764             :         { "__ndr_print__", (PyCFunction)py_netr_UserSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2765             :         { NULL, NULL, 0, NULL }
    2766             : };
    2767             : 
    2768             : 
    2769             : static PyTypeObject netr_UserSessionKey_Type = {
    2770             :         PyVarObject_HEAD_INIT(NULL, 0)
    2771             :         .tp_name = "netlogon.netr_UserSessionKey",
    2772             :         .tp_getset = py_netr_UserSessionKey_getsetters,
    2773             :         .tp_methods = py_netr_UserSessionKey_methods,
    2774             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2775             :         .tp_new = py_netr_UserSessionKey_new,
    2776             : };
    2777             : 
    2778             : 
    2779           0 : static PyObject *py_netr_LMSessionKey_get_key(PyObject *obj, void *closure)
    2780             : {
    2781           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(obj);
    2782             :         PyObject *py_key;
    2783           0 :         py_key = PyList_New(8);
    2784           0 :         if (py_key == NULL) {
    2785           0 :                 return NULL;
    2786             :         }
    2787             :         {
    2788             :                 int key_cntr_0;
    2789           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (8); key_cntr_0++) {
    2790             :                         PyObject *py_key_0;
    2791           0 :                         py_key_0 = PyLong_FromLong((uint16_t)object->key[key_cntr_0]);
    2792           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2793             :                 }
    2794             :         }
    2795           0 :         return py_key;
    2796             : }
    2797             : 
    2798           0 : static int py_netr_LMSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2799             : {
    2800           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2801           0 :         if (value == NULL) {
    2802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    2803           0 :                 return -1;
    2804             :         }
    2805           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2806             :         {
    2807             :                 int key_cntr_0;
    2808           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2809           0 :                         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));
    2810           0 :                         return -1;
    2811             :                 }
    2812           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2813           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2814           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key[key_cntr_0]");
    2815           0 :                                 return -1;
    2816             :                         }
    2817             :                         {
    2818           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->key[key_cntr_0]));
    2819           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2820             :                                         unsigned long long test_var;
    2821           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2822           0 :                                         if (PyErr_Occurred() != NULL) {
    2823           0 :                                                 return -1;
    2824             :                                         }
    2825           0 :                                         if (test_var > uint_max) {
    2826           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2827             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2828           0 :                                                 return -1;
    2829             :                                         }
    2830           0 :                                         object->key[key_cntr_0] = test_var;
    2831             :                                 } else {
    2832           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2833             :                                           PyLong_Type.tp_name);
    2834           0 :                                         return -1;
    2835             :                                 }
    2836             :                         }
    2837             :                 }
    2838             :         }
    2839           0 :         return 0;
    2840             : }
    2841             : 
    2842             : static PyGetSetDef py_netr_LMSessionKey_getsetters[] = {
    2843             :         {
    2844             :                 .name = discard_const_p(char, "key"),
    2845             :                 .get = py_netr_LMSessionKey_get_key,
    2846             :                 .set = py_netr_LMSessionKey_set_key,
    2847             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2848             :         },
    2849             :         { .name = NULL }
    2850             : };
    2851             : 
    2852           0 : static PyObject *py_netr_LMSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2853             : {
    2854           0 :         return pytalloc_new(struct netr_LMSessionKey, type);
    2855             : }
    2856             : 
    2857           0 : static PyObject *py_netr_LMSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2858             : {
    2859           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2860           0 :         PyObject *ret = NULL;
    2861             :         DATA_BLOB blob;
    2862             :         enum ndr_err_code err;
    2863           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2864           0 :         if (tmp_ctx == NULL) {
    2865           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2866           0 :                 return NULL;
    2867             :         }
    2868           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_LMSessionKey);
    2869           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2870           0 :                 TALLOC_FREE(tmp_ctx);
    2871           0 :                 PyErr_SetNdrError(err);
    2872           0 :                 return NULL;
    2873             :         }
    2874             : 
    2875           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2876           0 :         TALLOC_FREE(tmp_ctx);
    2877           0 :         return ret;
    2878             : }
    2879             : 
    2880           0 : static PyObject *py_netr_LMSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2881             : {
    2882           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2883           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2884           0 :         Py_ssize_t blob_length = 0;
    2885             :         enum ndr_err_code err;
    2886           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2887           0 :         PyObject *allow_remaining_obj = NULL;
    2888           0 :         bool allow_remaining = false;
    2889             : 
    2890           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2891             :                 discard_const_p(char *, kwnames),
    2892             :                 &blob.data, &blob_length,
    2893             :                 &allow_remaining_obj)) {
    2894           0 :                 return NULL;
    2895             :         }
    2896           0 :         blob.length = blob_length;
    2897             : 
    2898           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2899           0 :                 allow_remaining = true;
    2900             :         }
    2901             : 
    2902           0 :         if (allow_remaining) {
    2903           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2904             :         } else {
    2905           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2906             :         }
    2907           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2908           0 :                 PyErr_SetNdrError(err);
    2909           0 :                 return NULL;
    2910             :         }
    2911             : 
    2912           0 :         Py_RETURN_NONE;
    2913             : }
    2914             : 
    2915           0 : static PyObject *py_netr_LMSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2916             : {
    2917           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2918             :         PyObject *ret;
    2919             :         char *retstr;
    2920             : 
    2921           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_LMSessionKey, "netr_LMSessionKey", object);
    2922           0 :         ret = PyUnicode_FromString(retstr);
    2923           0 :         talloc_free(retstr);
    2924             : 
    2925           0 :         return ret;
    2926             : }
    2927             : 
    2928             : static PyMethodDef py_netr_LMSessionKey_methods[] = {
    2929             :         { "__ndr_pack__", (PyCFunction)py_netr_LMSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2930             :         { "__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" },
    2931             :         { "__ndr_print__", (PyCFunction)py_netr_LMSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2932             :         { NULL, NULL, 0, NULL }
    2933             : };
    2934             : 
    2935             : 
    2936             : static PyTypeObject netr_LMSessionKey_Type = {
    2937             :         PyVarObject_HEAD_INIT(NULL, 0)
    2938             :         .tp_name = "netlogon.netr_LMSessionKey",
    2939             :         .tp_getset = py_netr_LMSessionKey_getsetters,
    2940             :         .tp_methods = py_netr_LMSessionKey_methods,
    2941             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2942             :         .tp_new = py_netr_LMSessionKey_new,
    2943             : };
    2944             : 
    2945             : 
    2946           0 : static PyObject *py_netr_SamBaseInfo_get_logon_time(PyObject *obj, void *closure)
    2947             : {
    2948           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    2949             :         PyObject *py_logon_time;
    2950           0 :         py_logon_time = PyLong_FromUnsignedLongLong(object->logon_time);
    2951           0 :         return py_logon_time;
    2952             : }
    2953             : 
    2954           0 : static int py_netr_SamBaseInfo_set_logon_time(PyObject *py_obj, PyObject *value, void *closure)
    2955             : {
    2956           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    2957           0 :         if (value == NULL) {
    2958           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_time");
    2959           0 :                 return -1;
    2960             :         }
    2961             :         {
    2962           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_time));
    2963           0 :                 if (PyLong_Check(value)) {
    2964             :                         unsigned long long test_var;
    2965           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2966           0 :                         if (PyErr_Occurred() != NULL) {
    2967           0 :                                 return -1;
    2968             :                         }
    2969           0 :                         if (test_var > uint_max) {
    2970           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2971             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2972           0 :                                 return -1;
    2973             :                         }
    2974           0 :                         object->logon_time = test_var;
    2975             :                 } else {
    2976           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2977             :                           PyLong_Type.tp_name);
    2978           0 :                         return -1;
    2979             :                 }
    2980             :         }
    2981           0 :         return 0;
    2982             : }
    2983             : 
    2984           0 : static PyObject *py_netr_SamBaseInfo_get_logoff_time(PyObject *obj, void *closure)
    2985             : {
    2986           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    2987             :         PyObject *py_logoff_time;
    2988           0 :         py_logoff_time = PyLong_FromUnsignedLongLong(object->logoff_time);
    2989           0 :         return py_logoff_time;
    2990             : }
    2991             : 
    2992           0 : static int py_netr_SamBaseInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    2993             : {
    2994           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    2995           0 :         if (value == NULL) {
    2996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logoff_time");
    2997           0 :                 return -1;
    2998             :         }
    2999             :         {
    3000           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logoff_time));
    3001           0 :                 if (PyLong_Check(value)) {
    3002             :                         unsigned long long test_var;
    3003           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3004           0 :                         if (PyErr_Occurred() != NULL) {
    3005           0 :                                 return -1;
    3006             :                         }
    3007           0 :                         if (test_var > uint_max) {
    3008           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3009             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3010           0 :                                 return -1;
    3011             :                         }
    3012           0 :                         object->logoff_time = test_var;
    3013             :                 } else {
    3014           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3015             :                           PyLong_Type.tp_name);
    3016           0 :                         return -1;
    3017             :                 }
    3018             :         }
    3019           0 :         return 0;
    3020             : }
    3021             : 
    3022           0 : static PyObject *py_netr_SamBaseInfo_get_kickoff_time(PyObject *obj, void *closure)
    3023             : {
    3024           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3025             :         PyObject *py_kickoff_time;
    3026           0 :         py_kickoff_time = PyLong_FromUnsignedLongLong(object->kickoff_time);
    3027           0 :         return py_kickoff_time;
    3028             : }
    3029             : 
    3030           0 : static int py_netr_SamBaseInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
    3031             : {
    3032           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3033           0 :         if (value == NULL) {
    3034           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->kickoff_time");
    3035           0 :                 return -1;
    3036             :         }
    3037             :         {
    3038           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->kickoff_time));
    3039           0 :                 if (PyLong_Check(value)) {
    3040             :                         unsigned long long test_var;
    3041           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3042           0 :                         if (PyErr_Occurred() != NULL) {
    3043           0 :                                 return -1;
    3044             :                         }
    3045           0 :                         if (test_var > uint_max) {
    3046           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3047             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3048           0 :                                 return -1;
    3049             :                         }
    3050           0 :                         object->kickoff_time = test_var;
    3051             :                 } else {
    3052           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3053             :                           PyLong_Type.tp_name);
    3054           0 :                         return -1;
    3055             :                 }
    3056             :         }
    3057           0 :         return 0;
    3058             : }
    3059             : 
    3060           0 : static PyObject *py_netr_SamBaseInfo_get_last_password_change(PyObject *obj, void *closure)
    3061             : {
    3062           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3063             :         PyObject *py_last_password_change;
    3064           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    3065           0 :         return py_last_password_change;
    3066             : }
    3067             : 
    3068           0 : static int py_netr_SamBaseInfo_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3069             : {
    3070           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3071           0 :         if (value == NULL) {
    3072           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_password_change");
    3073           0 :                 return -1;
    3074             :         }
    3075             :         {
    3076           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    3077           0 :                 if (PyLong_Check(value)) {
    3078             :                         unsigned long long test_var;
    3079           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3080           0 :                         if (PyErr_Occurred() != NULL) {
    3081           0 :                                 return -1;
    3082             :                         }
    3083           0 :                         if (test_var > uint_max) {
    3084           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3085             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3086           0 :                                 return -1;
    3087             :                         }
    3088           0 :                         object->last_password_change = test_var;
    3089             :                 } else {
    3090           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3091             :                           PyLong_Type.tp_name);
    3092           0 :                         return -1;
    3093             :                 }
    3094             :         }
    3095           0 :         return 0;
    3096             : }
    3097             : 
    3098           0 : static PyObject *py_netr_SamBaseInfo_get_allow_password_change(PyObject *obj, void *closure)
    3099             : {
    3100           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3101             :         PyObject *py_allow_password_change;
    3102           0 :         py_allow_password_change = PyLong_FromUnsignedLongLong(object->allow_password_change);
    3103           0 :         return py_allow_password_change;
    3104             : }
    3105             : 
    3106           0 : static int py_netr_SamBaseInfo_set_allow_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3107             : {
    3108           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3109           0 :         if (value == NULL) {
    3110           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->allow_password_change");
    3111           0 :                 return -1;
    3112             :         }
    3113             :         {
    3114           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->allow_password_change));
    3115           0 :                 if (PyLong_Check(value)) {
    3116             :                         unsigned long long test_var;
    3117           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3118           0 :                         if (PyErr_Occurred() != NULL) {
    3119           0 :                                 return -1;
    3120             :                         }
    3121           0 :                         if (test_var > uint_max) {
    3122           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3123             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3124           0 :                                 return -1;
    3125             :                         }
    3126           0 :                         object->allow_password_change = test_var;
    3127             :                 } else {
    3128           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3129             :                           PyLong_Type.tp_name);
    3130           0 :                         return -1;
    3131             :                 }
    3132             :         }
    3133           0 :         return 0;
    3134             : }
    3135             : 
    3136           0 : static PyObject *py_netr_SamBaseInfo_get_force_password_change(PyObject *obj, void *closure)
    3137             : {
    3138           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3139             :         PyObject *py_force_password_change;
    3140           0 :         py_force_password_change = PyLong_FromUnsignedLongLong(object->force_password_change);
    3141           0 :         return py_force_password_change;
    3142             : }
    3143             : 
    3144           0 : static int py_netr_SamBaseInfo_set_force_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3145             : {
    3146           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3147           0 :         if (value == NULL) {
    3148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->force_password_change");
    3149           0 :                 return -1;
    3150             :         }
    3151             :         {
    3152           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->force_password_change));
    3153           0 :                 if (PyLong_Check(value)) {
    3154             :                         unsigned long long test_var;
    3155           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3156           0 :                         if (PyErr_Occurred() != NULL) {
    3157           0 :                                 return -1;
    3158             :                         }
    3159           0 :                         if (test_var > uint_max) {
    3160           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3161             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3162           0 :                                 return -1;
    3163             :                         }
    3164           0 :                         object->force_password_change = test_var;
    3165             :                 } else {
    3166           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3167             :                           PyLong_Type.tp_name);
    3168           0 :                         return -1;
    3169             :                 }
    3170             :         }
    3171           0 :         return 0;
    3172             : }
    3173             : 
    3174           4 : static PyObject *py_netr_SamBaseInfo_get_account_name(PyObject *obj, void *closure)
    3175             : {
    3176           4 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3177             :         PyObject *py_account_name;
    3178           4 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    3179           4 :         return py_account_name;
    3180             : }
    3181             : 
    3182           0 : static int py_netr_SamBaseInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    3183             : {
    3184           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3185           0 :         if (value == NULL) {
    3186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    3187           0 :                 return -1;
    3188             :         }
    3189           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3190           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3191           0 :                 PyErr_NoMemory();
    3192           0 :                 return -1;
    3193             :         }
    3194           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3195           0 :         return 0;
    3196             : }
    3197             : 
    3198           0 : static PyObject *py_netr_SamBaseInfo_get_full_name(PyObject *obj, void *closure)
    3199             : {
    3200           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3201             :         PyObject *py_full_name;
    3202           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    3203           0 :         return py_full_name;
    3204             : }
    3205             : 
    3206           0 : static int py_netr_SamBaseInfo_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    3207             : {
    3208           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3209           0 :         if (value == NULL) {
    3210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
    3211           0 :                 return -1;
    3212             :         }
    3213           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3214           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3215           0 :                 PyErr_NoMemory();
    3216           0 :                 return -1;
    3217             :         }
    3218           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3219           0 :         return 0;
    3220             : }
    3221             : 
    3222           0 : static PyObject *py_netr_SamBaseInfo_get_logon_script(PyObject *obj, void *closure)
    3223             : {
    3224           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3225             :         PyObject *py_logon_script;
    3226           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    3227           0 :         return py_logon_script;
    3228             : }
    3229             : 
    3230           0 : static int py_netr_SamBaseInfo_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    3231             : {
    3232           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3233           0 :         if (value == NULL) {
    3234           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_script");
    3235           0 :                 return -1;
    3236             :         }
    3237           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3238           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3239           0 :                 PyErr_NoMemory();
    3240           0 :                 return -1;
    3241             :         }
    3242           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    3243           0 :         return 0;
    3244             : }
    3245             : 
    3246           0 : static PyObject *py_netr_SamBaseInfo_get_profile_path(PyObject *obj, void *closure)
    3247             : {
    3248           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3249             :         PyObject *py_profile_path;
    3250           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    3251           0 :         return py_profile_path;
    3252             : }
    3253             : 
    3254           0 : static int py_netr_SamBaseInfo_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    3255             : {
    3256           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3257           0 :         if (value == NULL) {
    3258           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->profile_path");
    3259           0 :                 return -1;
    3260             :         }
    3261           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3262           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3263           0 :                 PyErr_NoMemory();
    3264           0 :                 return -1;
    3265             :         }
    3266           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    3267           0 :         return 0;
    3268             : }
    3269             : 
    3270           0 : static PyObject *py_netr_SamBaseInfo_get_home_directory(PyObject *obj, void *closure)
    3271             : {
    3272           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3273             :         PyObject *py_home_directory;
    3274           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    3275           0 :         return py_home_directory;
    3276             : }
    3277             : 
    3278           0 : static int py_netr_SamBaseInfo_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    3279             : {
    3280           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3281           0 :         if (value == NULL) {
    3282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_directory");
    3283           0 :                 return -1;
    3284             :         }
    3285           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3286           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3287           0 :                 PyErr_NoMemory();
    3288           0 :                 return -1;
    3289             :         }
    3290           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    3291           0 :         return 0;
    3292             : }
    3293             : 
    3294           0 : static PyObject *py_netr_SamBaseInfo_get_home_drive(PyObject *obj, void *closure)
    3295             : {
    3296           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3297             :         PyObject *py_home_drive;
    3298           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    3299           0 :         return py_home_drive;
    3300             : }
    3301             : 
    3302           0 : static int py_netr_SamBaseInfo_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    3303             : {
    3304           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3305           0 :         if (value == NULL) {
    3306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_drive");
    3307           0 :                 return -1;
    3308             :         }
    3309           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3310           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3311           0 :                 PyErr_NoMemory();
    3312           0 :                 return -1;
    3313             :         }
    3314           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    3315           0 :         return 0;
    3316             : }
    3317             : 
    3318           0 : static PyObject *py_netr_SamBaseInfo_get_logon_count(PyObject *obj, void *closure)
    3319             : {
    3320           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3321             :         PyObject *py_logon_count;
    3322           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    3323           0 :         return py_logon_count;
    3324             : }
    3325             : 
    3326           0 : static int py_netr_SamBaseInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3327             : {
    3328           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3329           0 :         if (value == NULL) {
    3330           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    3331           0 :                 return -1;
    3332             :         }
    3333             :         {
    3334           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    3335           0 :                 if (PyLong_Check(value)) {
    3336             :                         unsigned long long test_var;
    3337           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3338           0 :                         if (PyErr_Occurred() != NULL) {
    3339           0 :                                 return -1;
    3340             :                         }
    3341           0 :                         if (test_var > uint_max) {
    3342           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3343             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3344           0 :                                 return -1;
    3345             :                         }
    3346           0 :                         object->logon_count = test_var;
    3347             :                 } else {
    3348           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3349             :                           PyLong_Type.tp_name);
    3350           0 :                         return -1;
    3351             :                 }
    3352             :         }
    3353           0 :         return 0;
    3354             : }
    3355             : 
    3356           0 : static PyObject *py_netr_SamBaseInfo_get_bad_password_count(PyObject *obj, void *closure)
    3357             : {
    3358           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3359             :         PyObject *py_bad_password_count;
    3360           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)object->bad_password_count);
    3361           0 :         return py_bad_password_count;
    3362             : }
    3363             : 
    3364           0 : static int py_netr_SamBaseInfo_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    3365             : {
    3366           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3367           0 :         if (value == NULL) {
    3368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_password_count");
    3369           0 :                 return -1;
    3370             :         }
    3371             :         {
    3372           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    3373           0 :                 if (PyLong_Check(value)) {
    3374             :                         unsigned long long test_var;
    3375           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3376           0 :                         if (PyErr_Occurred() != NULL) {
    3377           0 :                                 return -1;
    3378             :                         }
    3379           0 :                         if (test_var > uint_max) {
    3380           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3381             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3382           0 :                                 return -1;
    3383             :                         }
    3384           0 :                         object->bad_password_count = test_var;
    3385             :                 } else {
    3386           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3387             :                           PyLong_Type.tp_name);
    3388           0 :                         return -1;
    3389             :                 }
    3390             :         }
    3391           0 :         return 0;
    3392             : }
    3393             : 
    3394           4 : static PyObject *py_netr_SamBaseInfo_get_rid(PyObject *obj, void *closure)
    3395             : {
    3396           4 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3397             :         PyObject *py_rid;
    3398           4 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
    3399           4 :         return py_rid;
    3400             : }
    3401             : 
    3402           0 : static int py_netr_SamBaseInfo_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    3403             : {
    3404           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3405           0 :         if (value == NULL) {
    3406           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
    3407           0 :                 return -1;
    3408             :         }
    3409             :         {
    3410           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    3411           0 :                 if (PyLong_Check(value)) {
    3412             :                         unsigned long long test_var;
    3413           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3414           0 :                         if (PyErr_Occurred() != NULL) {
    3415           0 :                                 return -1;
    3416             :                         }
    3417           0 :                         if (test_var > uint_max) {
    3418           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3419             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3420           0 :                                 return -1;
    3421             :                         }
    3422           0 :                         object->rid = test_var;
    3423             :                 } else {
    3424           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3425             :                           PyLong_Type.tp_name);
    3426           0 :                         return -1;
    3427             :                 }
    3428             :         }
    3429           0 :         return 0;
    3430             : }
    3431             : 
    3432           0 : static PyObject *py_netr_SamBaseInfo_get_primary_gid(PyObject *obj, void *closure)
    3433             : {
    3434           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3435             :         PyObject *py_primary_gid;
    3436           0 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)object->primary_gid);
    3437           0 :         return py_primary_gid;
    3438             : }
    3439             : 
    3440           0 : static int py_netr_SamBaseInfo_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    3441             : {
    3442           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3443           0 :         if (value == NULL) {
    3444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
    3445           0 :                 return -1;
    3446             :         }
    3447             :         {
    3448           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    3449           0 :                 if (PyLong_Check(value)) {
    3450             :                         unsigned long long test_var;
    3451           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3452           0 :                         if (PyErr_Occurred() != NULL) {
    3453           0 :                                 return -1;
    3454             :                         }
    3455           0 :                         if (test_var > uint_max) {
    3456           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3457             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3458           0 :                                 return -1;
    3459             :                         }
    3460           0 :                         object->primary_gid = test_var;
    3461             :                 } else {
    3462           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3463             :                           PyLong_Type.tp_name);
    3464           0 :                         return -1;
    3465             :                 }
    3466             :         }
    3467           0 :         return 0;
    3468             : }
    3469             : 
    3470           0 : static PyObject *py_netr_SamBaseInfo_get_groups(PyObject *obj, void *closure)
    3471             : {
    3472           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3473             :         PyObject *py_groups;
    3474           0 :         py_groups = pytalloc_reference_ex(samr_RidWithAttributeArray_Type, pytalloc_get_mem_ctx(obj), &object->groups);
    3475           0 :         return py_groups;
    3476             : }
    3477             : 
    3478           0 : static int py_netr_SamBaseInfo_set_groups(PyObject *py_obj, PyObject *value, void *closure)
    3479             : {
    3480           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3481           0 :         if (value == NULL) {
    3482           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->groups");
    3483           0 :                 return -1;
    3484             :         }
    3485           0 :         PY_CHECK_TYPE(samr_RidWithAttributeArray_Type, value, return -1;);
    3486           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3487           0 :                 PyErr_NoMemory();
    3488           0 :                 return -1;
    3489             :         }
    3490           0 :         object->groups = *(struct samr_RidWithAttributeArray *)pytalloc_get_ptr(value);
    3491           0 :         return 0;
    3492             : }
    3493             : 
    3494           0 : static PyObject *py_netr_SamBaseInfo_get_user_flags(PyObject *obj, void *closure)
    3495             : {
    3496           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3497             :         PyObject *py_user_flags;
    3498           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
    3499           0 :         return py_user_flags;
    3500             : }
    3501             : 
    3502           0 : static int py_netr_SamBaseInfo_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    3503             : {
    3504           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3505           0 :         if (value == NULL) {
    3506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
    3507           0 :                 return -1;
    3508             :         }
    3509             :         {
    3510           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    3511           0 :                 if (PyLong_Check(value)) {
    3512             :                         unsigned long long test_var;
    3513           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3514           0 :                         if (PyErr_Occurred() != NULL) {
    3515           0 :                                 return -1;
    3516             :                         }
    3517           0 :                         if (test_var > uint_max) {
    3518           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3519             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3520           0 :                                 return -1;
    3521             :                         }
    3522           0 :                         object->user_flags = test_var;
    3523             :                 } else {
    3524           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3525             :                           PyLong_Type.tp_name);
    3526           0 :                         return -1;
    3527             :                 }
    3528             :         }
    3529           0 :         return 0;
    3530             : }
    3531             : 
    3532           0 : static PyObject *py_netr_SamBaseInfo_get_key(PyObject *obj, void *closure)
    3533             : {
    3534           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3535             :         PyObject *py_key;
    3536           0 :         py_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->key);
    3537           0 :         return py_key;
    3538             : }
    3539             : 
    3540           0 : static int py_netr_SamBaseInfo_set_key(PyObject *py_obj, PyObject *value, void *closure)
    3541             : {
    3542           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3543           0 :         if (value == NULL) {
    3544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    3545           0 :                 return -1;
    3546             :         }
    3547           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    3548           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3549           0 :                 PyErr_NoMemory();
    3550           0 :                 return -1;
    3551             :         }
    3552           0 :         object->key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    3553           0 :         return 0;
    3554             : }
    3555             : 
    3556           0 : static PyObject *py_netr_SamBaseInfo_get_logon_server(PyObject *obj, void *closure)
    3557             : {
    3558           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3559             :         PyObject *py_logon_server;
    3560           0 :         py_logon_server = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    3561           0 :         return py_logon_server;
    3562             : }
    3563             : 
    3564           0 : static int py_netr_SamBaseInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    3565             : {
    3566           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3567           0 :         if (value == NULL) {
    3568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_server");
    3569           0 :                 return -1;
    3570             :         }
    3571           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3572           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3573           0 :                 PyErr_NoMemory();
    3574           0 :                 return -1;
    3575             :         }
    3576           0 :         object->logon_server = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3577           0 :         return 0;
    3578             : }
    3579             : 
    3580           0 : static PyObject *py_netr_SamBaseInfo_get_logon_domain(PyObject *obj, void *closure)
    3581             : {
    3582           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3583             :         PyObject *py_logon_domain;
    3584           0 :         py_logon_domain = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    3585           0 :         return py_logon_domain;
    3586             : }
    3587             : 
    3588           0 : static int py_netr_SamBaseInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    3589             : {
    3590           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3591           0 :         if (value == NULL) {
    3592           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_domain");
    3593           0 :                 return -1;
    3594             :         }
    3595           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3596           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3597           0 :                 PyErr_NoMemory();
    3598           0 :                 return -1;
    3599             :         }
    3600           0 :         object->logon_domain = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3601           0 :         return 0;
    3602             : }
    3603             : 
    3604           4 : static PyObject *py_netr_SamBaseInfo_get_domain_sid(PyObject *obj, void *closure)
    3605             : {
    3606           4 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3607             :         PyObject *py_domain_sid;
    3608           4 :         if (object->domain_sid == NULL) {
    3609           0 :                 Py_RETURN_NONE;
    3610             :         }
    3611           4 :         if (object->domain_sid == NULL) {
    3612           0 :                 py_domain_sid = Py_None;
    3613           0 :                 Py_INCREF(py_domain_sid);
    3614             :         } else {
    3615           4 :                 py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
    3616             :         }
    3617           4 :         return py_domain_sid;
    3618             : }
    3619             : 
    3620           0 : static int py_netr_SamBaseInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
    3621             : {
    3622           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3623           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
    3624           0 :         if (value == NULL) {
    3625           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_sid");
    3626           0 :                 return -1;
    3627             :         }
    3628           0 :         if (value == Py_None) {
    3629           0 :                 object->domain_sid = NULL;
    3630             :         } else {
    3631           0 :                 object->domain_sid = NULL;
    3632           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    3633           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3634           0 :                         PyErr_NoMemory();
    3635           0 :                         return -1;
    3636             :                 }
    3637           0 :                 object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
    3638             :         }
    3639           0 :         return 0;
    3640             : }
    3641             : 
    3642           0 : static PyObject *py_netr_SamBaseInfo_get_LMSessKey(PyObject *obj, void *closure)
    3643             : {
    3644           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3645             :         PyObject *py_LMSessKey;
    3646           0 :         py_LMSessKey = pytalloc_reference_ex(&netr_LMSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->LMSessKey);
    3647           0 :         return py_LMSessKey;
    3648             : }
    3649             : 
    3650           0 : static int py_netr_SamBaseInfo_set_LMSessKey(PyObject *py_obj, PyObject *value, void *closure)
    3651             : {
    3652           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3653           0 :         if (value == NULL) {
    3654           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->LMSessKey");
    3655           0 :                 return -1;
    3656             :         }
    3657           0 :         PY_CHECK_TYPE(&netr_LMSessionKey_Type, value, return -1;);
    3658           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3659           0 :                 PyErr_NoMemory();
    3660           0 :                 return -1;
    3661             :         }
    3662           0 :         object->LMSessKey = *(struct netr_LMSessionKey *)pytalloc_get_ptr(value);
    3663           0 :         return 0;
    3664             : }
    3665             : 
    3666           0 : static PyObject *py_netr_SamBaseInfo_get_acct_flags(PyObject *obj, void *closure)
    3667             : {
    3668           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3669             :         PyObject *py_acct_flags;
    3670           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)object->acct_flags);
    3671           0 :         return py_acct_flags;
    3672             : }
    3673             : 
    3674           0 : static int py_netr_SamBaseInfo_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    3675             : {
    3676           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3677           0 :         if (value == NULL) {
    3678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_flags");
    3679           0 :                 return -1;
    3680             :         }
    3681             :         {
    3682           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    3683           0 :                 if (PyLong_Check(value)) {
    3684             :                         unsigned long long test_var;
    3685           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3686           0 :                         if (PyErr_Occurred() != NULL) {
    3687           0 :                                 return -1;
    3688             :                         }
    3689           0 :                         if (test_var > uint_max) {
    3690           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3691             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3692           0 :                                 return -1;
    3693             :                         }
    3694           0 :                         object->acct_flags = test_var;
    3695             :                 } else {
    3696           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3697             :                           PyLong_Type.tp_name);
    3698           0 :                         return -1;
    3699             :                 }
    3700             :         }
    3701           0 :         return 0;
    3702             : }
    3703             : 
    3704           0 : static PyObject *py_netr_SamBaseInfo_get_sub_auth_status(PyObject *obj, void *closure)
    3705             : {
    3706           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3707             :         PyObject *py_sub_auth_status;
    3708           0 :         py_sub_auth_status = PyLong_FromUnsignedLongLong((uint32_t)object->sub_auth_status);
    3709           0 :         return py_sub_auth_status;
    3710             : }
    3711             : 
    3712           0 : static int py_netr_SamBaseInfo_set_sub_auth_status(PyObject *py_obj, PyObject *value, void *closure)
    3713             : {
    3714           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3715           0 :         if (value == NULL) {
    3716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sub_auth_status");
    3717           0 :                 return -1;
    3718             :         }
    3719             :         {
    3720           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sub_auth_status));
    3721           0 :                 if (PyLong_Check(value)) {
    3722             :                         unsigned long long test_var;
    3723           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3724           0 :                         if (PyErr_Occurred() != NULL) {
    3725           0 :                                 return -1;
    3726             :                         }
    3727           0 :                         if (test_var > uint_max) {
    3728           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3729             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3730           0 :                                 return -1;
    3731             :                         }
    3732           0 :                         object->sub_auth_status = test_var;
    3733             :                 } else {
    3734           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3735             :                           PyLong_Type.tp_name);
    3736           0 :                         return -1;
    3737             :                 }
    3738             :         }
    3739           0 :         return 0;
    3740             : }
    3741             : 
    3742           0 : static PyObject *py_netr_SamBaseInfo_get_last_successful_logon(PyObject *obj, void *closure)
    3743             : {
    3744           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3745             :         PyObject *py_last_successful_logon;
    3746           0 :         py_last_successful_logon = PyLong_FromUnsignedLongLong(object->last_successful_logon);
    3747           0 :         return py_last_successful_logon;
    3748             : }
    3749             : 
    3750           0 : static int py_netr_SamBaseInfo_set_last_successful_logon(PyObject *py_obj, PyObject *value, void *closure)
    3751             : {
    3752           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3753           0 :         if (value == NULL) {
    3754           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_successful_logon");
    3755           0 :                 return -1;
    3756             :         }
    3757             :         {
    3758           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_successful_logon));
    3759           0 :                 if (PyLong_Check(value)) {
    3760             :                         unsigned long long test_var;
    3761           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3762           0 :                         if (PyErr_Occurred() != NULL) {
    3763           0 :                                 return -1;
    3764             :                         }
    3765           0 :                         if (test_var > uint_max) {
    3766           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3767             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3768           0 :                                 return -1;
    3769             :                         }
    3770           0 :                         object->last_successful_logon = test_var;
    3771             :                 } else {
    3772           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3773             :                           PyLong_Type.tp_name);
    3774           0 :                         return -1;
    3775             :                 }
    3776             :         }
    3777           0 :         return 0;
    3778             : }
    3779             : 
    3780           0 : static PyObject *py_netr_SamBaseInfo_get_last_failed_logon(PyObject *obj, void *closure)
    3781             : {
    3782           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3783             :         PyObject *py_last_failed_logon;
    3784           0 :         py_last_failed_logon = PyLong_FromUnsignedLongLong(object->last_failed_logon);
    3785           0 :         return py_last_failed_logon;
    3786             : }
    3787             : 
    3788           0 : static int py_netr_SamBaseInfo_set_last_failed_logon(PyObject *py_obj, PyObject *value, void *closure)
    3789             : {
    3790           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3791           0 :         if (value == NULL) {
    3792           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_failed_logon");
    3793           0 :                 return -1;
    3794             :         }
    3795             :         {
    3796           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_failed_logon));
    3797           0 :                 if (PyLong_Check(value)) {
    3798             :                         unsigned long long test_var;
    3799           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3800           0 :                         if (PyErr_Occurred() != NULL) {
    3801           0 :                                 return -1;
    3802             :                         }
    3803           0 :                         if (test_var > uint_max) {
    3804           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3805             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3806           0 :                                 return -1;
    3807             :                         }
    3808           0 :                         object->last_failed_logon = test_var;
    3809             :                 } else {
    3810           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3811             :                           PyLong_Type.tp_name);
    3812           0 :                         return -1;
    3813             :                 }
    3814             :         }
    3815           0 :         return 0;
    3816             : }
    3817             : 
    3818           0 : static PyObject *py_netr_SamBaseInfo_get_failed_logon_count(PyObject *obj, void *closure)
    3819             : {
    3820           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3821             :         PyObject *py_failed_logon_count;
    3822           0 :         py_failed_logon_count = PyLong_FromUnsignedLongLong((uint32_t)object->failed_logon_count);
    3823           0 :         return py_failed_logon_count;
    3824             : }
    3825             : 
    3826           0 : static int py_netr_SamBaseInfo_set_failed_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3827             : {
    3828           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3829           0 :         if (value == NULL) {
    3830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->failed_logon_count");
    3831           0 :                 return -1;
    3832             :         }
    3833             :         {
    3834           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->failed_logon_count));
    3835           0 :                 if (PyLong_Check(value)) {
    3836             :                         unsigned long long test_var;
    3837           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3838           0 :                         if (PyErr_Occurred() != NULL) {
    3839           0 :                                 return -1;
    3840             :                         }
    3841           0 :                         if (test_var > uint_max) {
    3842           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3843             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3844           0 :                                 return -1;
    3845             :                         }
    3846           0 :                         object->failed_logon_count = test_var;
    3847             :                 } else {
    3848           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3849             :                           PyLong_Type.tp_name);
    3850           0 :                         return -1;
    3851             :                 }
    3852             :         }
    3853           0 :         return 0;
    3854             : }
    3855             : 
    3856           0 : static PyObject *py_netr_SamBaseInfo_get_reserved(PyObject *obj, void *closure)
    3857             : {
    3858           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3859             :         PyObject *py_reserved;
    3860           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
    3861           0 :         return py_reserved;
    3862             : }
    3863             : 
    3864           0 : static int py_netr_SamBaseInfo_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    3865             : {
    3866           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3867           0 :         if (value == NULL) {
    3868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    3869           0 :                 return -1;
    3870             :         }
    3871             :         {
    3872           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    3873           0 :                 if (PyLong_Check(value)) {
    3874             :                         unsigned long long test_var;
    3875           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3876           0 :                         if (PyErr_Occurred() != NULL) {
    3877           0 :                                 return -1;
    3878             :                         }
    3879           0 :                         if (test_var > uint_max) {
    3880           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3881             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3882           0 :                                 return -1;
    3883             :                         }
    3884           0 :                         object->reserved = test_var;
    3885             :                 } else {
    3886           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3887             :                           PyLong_Type.tp_name);
    3888           0 :                         return -1;
    3889             :                 }
    3890             :         }
    3891           0 :         return 0;
    3892             : }
    3893             : 
    3894             : static PyGetSetDef py_netr_SamBaseInfo_getsetters[] = {
    3895             :         {
    3896             :                 .name = discard_const_p(char, "logon_time"),
    3897             :                 .get = py_netr_SamBaseInfo_get_logon_time,
    3898             :                 .set = py_netr_SamBaseInfo_set_logon_time,
    3899             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3900             :         },
    3901             :         {
    3902             :                 .name = discard_const_p(char, "logoff_time"),
    3903             :                 .get = py_netr_SamBaseInfo_get_logoff_time,
    3904             :                 .set = py_netr_SamBaseInfo_set_logoff_time,
    3905             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3906             :         },
    3907             :         {
    3908             :                 .name = discard_const_p(char, "kickoff_time"),
    3909             :                 .get = py_netr_SamBaseInfo_get_kickoff_time,
    3910             :                 .set = py_netr_SamBaseInfo_set_kickoff_time,
    3911             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3912             :         },
    3913             :         {
    3914             :                 .name = discard_const_p(char, "last_password_change"),
    3915             :                 .get = py_netr_SamBaseInfo_get_last_password_change,
    3916             :                 .set = py_netr_SamBaseInfo_set_last_password_change,
    3917             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3918             :         },
    3919             :         {
    3920             :                 .name = discard_const_p(char, "allow_password_change"),
    3921             :                 .get = py_netr_SamBaseInfo_get_allow_password_change,
    3922             :                 .set = py_netr_SamBaseInfo_set_allow_password_change,
    3923             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3924             :         },
    3925             :         {
    3926             :                 .name = discard_const_p(char, "force_password_change"),
    3927             :                 .get = py_netr_SamBaseInfo_get_force_password_change,
    3928             :                 .set = py_netr_SamBaseInfo_set_force_password_change,
    3929             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3930             :         },
    3931             :         {
    3932             :                 .name = discard_const_p(char, "account_name"),
    3933             :                 .get = py_netr_SamBaseInfo_get_account_name,
    3934             :                 .set = py_netr_SamBaseInfo_set_account_name,
    3935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3936             :         },
    3937             :         {
    3938             :                 .name = discard_const_p(char, "full_name"),
    3939             :                 .get = py_netr_SamBaseInfo_get_full_name,
    3940             :                 .set = py_netr_SamBaseInfo_set_full_name,
    3941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3942             :         },
    3943             :         {
    3944             :                 .name = discard_const_p(char, "logon_script"),
    3945             :                 .get = py_netr_SamBaseInfo_get_logon_script,
    3946             :                 .set = py_netr_SamBaseInfo_set_logon_script,
    3947             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3948             :         },
    3949             :         {
    3950             :                 .name = discard_const_p(char, "profile_path"),
    3951             :                 .get = py_netr_SamBaseInfo_get_profile_path,
    3952             :                 .set = py_netr_SamBaseInfo_set_profile_path,
    3953             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3954             :         },
    3955             :         {
    3956             :                 .name = discard_const_p(char, "home_directory"),
    3957             :                 .get = py_netr_SamBaseInfo_get_home_directory,
    3958             :                 .set = py_netr_SamBaseInfo_set_home_directory,
    3959             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3960             :         },
    3961             :         {
    3962             :                 .name = discard_const_p(char, "home_drive"),
    3963             :                 .get = py_netr_SamBaseInfo_get_home_drive,
    3964             :                 .set = py_netr_SamBaseInfo_set_home_drive,
    3965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3966             :         },
    3967             :         {
    3968             :                 .name = discard_const_p(char, "logon_count"),
    3969             :                 .get = py_netr_SamBaseInfo_get_logon_count,
    3970             :                 .set = py_netr_SamBaseInfo_set_logon_count,
    3971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3972             :         },
    3973             :         {
    3974             :                 .name = discard_const_p(char, "bad_password_count"),
    3975             :                 .get = py_netr_SamBaseInfo_get_bad_password_count,
    3976             :                 .set = py_netr_SamBaseInfo_set_bad_password_count,
    3977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3978             :         },
    3979             :         {
    3980             :                 .name = discard_const_p(char, "rid"),
    3981             :                 .get = py_netr_SamBaseInfo_get_rid,
    3982             :                 .set = py_netr_SamBaseInfo_set_rid,
    3983             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3984             :         },
    3985             :         {
    3986             :                 .name = discard_const_p(char, "primary_gid"),
    3987             :                 .get = py_netr_SamBaseInfo_get_primary_gid,
    3988             :                 .set = py_netr_SamBaseInfo_set_primary_gid,
    3989             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3990             :         },
    3991             :         {
    3992             :                 .name = discard_const_p(char, "groups"),
    3993             :                 .get = py_netr_SamBaseInfo_get_groups,
    3994             :                 .set = py_netr_SamBaseInfo_set_groups,
    3995             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_RidWithAttributeArray")
    3996             :         },
    3997             :         {
    3998             :                 .name = discard_const_p(char, "user_flags"),
    3999             :                 .get = py_netr_SamBaseInfo_get_user_flags,
    4000             :                 .set = py_netr_SamBaseInfo_set_user_flags,
    4001             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserFlags")
    4002             :         },
    4003             :         {
    4004             :                 .name = discard_const_p(char, "key"),
    4005             :                 .get = py_netr_SamBaseInfo_get_key,
    4006             :                 .set = py_netr_SamBaseInfo_set_key,
    4007             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    4008             :         },
    4009             :         {
    4010             :                 .name = discard_const_p(char, "logon_server"),
    4011             :                 .get = py_netr_SamBaseInfo_get_logon_server,
    4012             :                 .set = py_netr_SamBaseInfo_set_logon_server,
    4013             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4014             :         },
    4015             :         {
    4016             :                 .name = discard_const_p(char, "logon_domain"),
    4017             :                 .get = py_netr_SamBaseInfo_get_logon_domain,
    4018             :                 .set = py_netr_SamBaseInfo_set_logon_domain,
    4019             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4020             :         },
    4021             :         {
    4022             :                 .name = discard_const_p(char, "domain_sid"),
    4023             :                 .get = py_netr_SamBaseInfo_get_domain_sid,
    4024             :                 .set = py_netr_SamBaseInfo_set_domain_sid,
    4025             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4026             :         },
    4027             :         {
    4028             :                 .name = discard_const_p(char, "LMSessKey"),
    4029             :                 .get = py_netr_SamBaseInfo_get_LMSessKey,
    4030             :                 .set = py_netr_SamBaseInfo_set_LMSessKey,
    4031             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LMSessionKey")
    4032             :         },
    4033             :         {
    4034             :                 .name = discard_const_p(char, "acct_flags"),
    4035             :                 .get = py_netr_SamBaseInfo_get_acct_flags,
    4036             :                 .set = py_netr_SamBaseInfo_set_acct_flags,
    4037             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    4038             :         },
    4039             :         {
    4040             :                 .name = discard_const_p(char, "sub_auth_status"),
    4041             :                 .get = py_netr_SamBaseInfo_get_sub_auth_status,
    4042             :                 .set = py_netr_SamBaseInfo_set_sub_auth_status,
    4043             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4044             :         },
    4045             :         {
    4046             :                 .name = discard_const_p(char, "last_successful_logon"),
    4047             :                 .get = py_netr_SamBaseInfo_get_last_successful_logon,
    4048             :                 .set = py_netr_SamBaseInfo_set_last_successful_logon,
    4049             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4050             :         },
    4051             :         {
    4052             :                 .name = discard_const_p(char, "last_failed_logon"),
    4053             :                 .get = py_netr_SamBaseInfo_get_last_failed_logon,
    4054             :                 .set = py_netr_SamBaseInfo_set_last_failed_logon,
    4055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4056             :         },
    4057             :         {
    4058             :                 .name = discard_const_p(char, "failed_logon_count"),
    4059             :                 .get = py_netr_SamBaseInfo_get_failed_logon_count,
    4060             :                 .set = py_netr_SamBaseInfo_set_failed_logon_count,
    4061             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4062             :         },
    4063             :         {
    4064             :                 .name = discard_const_p(char, "reserved"),
    4065             :                 .get = py_netr_SamBaseInfo_get_reserved,
    4066             :                 .set = py_netr_SamBaseInfo_set_reserved,
    4067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4068             :         },
    4069             :         { .name = NULL }
    4070             : };
    4071             : 
    4072           0 : static PyObject *py_netr_SamBaseInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4073             : {
    4074           0 :         return pytalloc_new(struct netr_SamBaseInfo, type);
    4075             : }
    4076             : 
    4077             : 
    4078             : static PyTypeObject netr_SamBaseInfo_Type = {
    4079             :         PyVarObject_HEAD_INIT(NULL, 0)
    4080             :         .tp_name = "netlogon.netr_SamBaseInfo",
    4081             :         .tp_getset = py_netr_SamBaseInfo_getsetters,
    4082             :         .tp_methods = NULL,
    4083             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4084             :         .tp_new = py_netr_SamBaseInfo_new,
    4085             : };
    4086             : 
    4087             : 
    4088           0 : static PyObject *py_netr_SamInfo2_get_base(PyObject *obj, void *closure)
    4089             : {
    4090           0 :         struct netr_SamInfo2 *object = (struct netr_SamInfo2 *)pytalloc_get_ptr(obj);
    4091             :         PyObject *py_base;
    4092           0 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4093           0 :         return py_base;
    4094             : }
    4095             : 
    4096           0 : static int py_netr_SamInfo2_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4097             : {
    4098           0 :         struct netr_SamInfo2 *object = (struct netr_SamInfo2 *)pytalloc_get_ptr(py_obj);
    4099           0 :         if (value == NULL) {
    4100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4101           0 :                 return -1;
    4102             :         }
    4103           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4104           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4105           0 :                 PyErr_NoMemory();
    4106           0 :                 return -1;
    4107             :         }
    4108           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4109           0 :         return 0;
    4110             : }
    4111             : 
    4112             : static PyGetSetDef py_netr_SamInfo2_getsetters[] = {
    4113             :         {
    4114             :                 .name = discard_const_p(char, "base"),
    4115             :                 .get = py_netr_SamInfo2_get_base,
    4116             :                 .set = py_netr_SamInfo2_set_base,
    4117             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4118             :         },
    4119             :         { .name = NULL }
    4120             : };
    4121             : 
    4122           0 : static PyObject *py_netr_SamInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4123             : {
    4124           0 :         return pytalloc_new(struct netr_SamInfo2, type);
    4125             : }
    4126             : 
    4127             : 
    4128             : static PyTypeObject netr_SamInfo2_Type = {
    4129             :         PyVarObject_HEAD_INIT(NULL, 0)
    4130             :         .tp_name = "netlogon.netr_SamInfo2",
    4131             :         .tp_getset = py_netr_SamInfo2_getsetters,
    4132             :         .tp_methods = NULL,
    4133             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4134             :         .tp_new = py_netr_SamInfo2_new,
    4135             : };
    4136             : 
    4137             : 
    4138           0 : static PyObject *py_netr_SidAttr_get_sid(PyObject *obj, void *closure)
    4139             : {
    4140           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(obj);
    4141             :         PyObject *py_sid;
    4142           0 :         if (object->sid == NULL) {
    4143           0 :                 Py_RETURN_NONE;
    4144             :         }
    4145           0 :         if (object->sid == NULL) {
    4146           0 :                 py_sid = Py_None;
    4147           0 :                 Py_INCREF(py_sid);
    4148             :         } else {
    4149           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
    4150             :         }
    4151           0 :         return py_sid;
    4152             : }
    4153             : 
    4154           0 : static int py_netr_SidAttr_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    4155             : {
    4156           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4157           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
    4158           0 :         if (value == NULL) {
    4159           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    4160           0 :                 return -1;
    4161             :         }
    4162           0 :         if (value == Py_None) {
    4163           0 :                 object->sid = NULL;
    4164             :         } else {
    4165           0 :                 object->sid = NULL;
    4166           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    4167           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4168           0 :                         PyErr_NoMemory();
    4169           0 :                         return -1;
    4170             :                 }
    4171           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
    4172             :         }
    4173           0 :         return 0;
    4174             : }
    4175             : 
    4176           0 : static PyObject *py_netr_SidAttr_get_attributes(PyObject *obj, void *closure)
    4177             : {
    4178           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(obj);
    4179             :         PyObject *py_attributes;
    4180           0 :         py_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->attributes);
    4181           0 :         return py_attributes;
    4182             : }
    4183             : 
    4184           0 : static int py_netr_SidAttr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
    4185             : {
    4186           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4187           0 :         if (value == NULL) {
    4188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes");
    4189           0 :                 return -1;
    4190             :         }
    4191             :         {
    4192           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
    4193           0 :                 if (PyLong_Check(value)) {
    4194             :                         unsigned long long test_var;
    4195           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4196           0 :                         if (PyErr_Occurred() != NULL) {
    4197           0 :                                 return -1;
    4198             :                         }
    4199           0 :                         if (test_var > uint_max) {
    4200           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4201             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4202           0 :                                 return -1;
    4203             :                         }
    4204           0 :                         object->attributes = test_var;
    4205             :                 } else {
    4206           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4207             :                           PyLong_Type.tp_name);
    4208           0 :                         return -1;
    4209             :                 }
    4210             :         }
    4211           0 :         return 0;
    4212             : }
    4213             : 
    4214             : static PyGetSetDef py_netr_SidAttr_getsetters[] = {
    4215             :         {
    4216             :                 .name = discard_const_p(char, "sid"),
    4217             :                 .get = py_netr_SidAttr_get_sid,
    4218             :                 .set = py_netr_SidAttr_set_sid,
    4219             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4220             :         },
    4221             :         {
    4222             :                 .name = discard_const_p(char, "attributes"),
    4223             :                 .get = py_netr_SidAttr_get_attributes,
    4224             :                 .set = py_netr_SidAttr_set_attributes,
    4225             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_GroupAttrs")
    4226             :         },
    4227             :         { .name = NULL }
    4228             : };
    4229             : 
    4230           0 : static PyObject *py_netr_SidAttr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4231             : {
    4232           0 :         return pytalloc_new(struct netr_SidAttr, type);
    4233             : }
    4234             : 
    4235           0 : static PyObject *py_netr_SidAttr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4236             : {
    4237           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4238           0 :         PyObject *ret = NULL;
    4239             :         DATA_BLOB blob;
    4240             :         enum ndr_err_code err;
    4241           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4242           0 :         if (tmp_ctx == NULL) {
    4243           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4244           0 :                 return NULL;
    4245             :         }
    4246           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SidAttr);
    4247           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4248           0 :                 TALLOC_FREE(tmp_ctx);
    4249           0 :                 PyErr_SetNdrError(err);
    4250           0 :                 return NULL;
    4251             :         }
    4252             : 
    4253           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4254           0 :         TALLOC_FREE(tmp_ctx);
    4255           0 :         return ret;
    4256             : }
    4257             : 
    4258           0 : static PyObject *py_netr_SidAttr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4259             : {
    4260           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4261           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4262           0 :         Py_ssize_t blob_length = 0;
    4263             :         enum ndr_err_code err;
    4264           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4265           0 :         PyObject *allow_remaining_obj = NULL;
    4266           0 :         bool allow_remaining = false;
    4267             : 
    4268           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4269             :                 discard_const_p(char *, kwnames),
    4270             :                 &blob.data, &blob_length,
    4271             :                 &allow_remaining_obj)) {
    4272           0 :                 return NULL;
    4273             :         }
    4274           0 :         blob.length = blob_length;
    4275             : 
    4276           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4277           0 :                 allow_remaining = true;
    4278             :         }
    4279             : 
    4280           0 :         if (allow_remaining) {
    4281           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4282             :         } else {
    4283           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4284             :         }
    4285           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4286           0 :                 PyErr_SetNdrError(err);
    4287           0 :                 return NULL;
    4288             :         }
    4289             : 
    4290           0 :         Py_RETURN_NONE;
    4291             : }
    4292             : 
    4293           0 : static PyObject *py_netr_SidAttr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4294             : {
    4295           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4296             :         PyObject *ret;
    4297             :         char *retstr;
    4298             : 
    4299           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SidAttr, "netr_SidAttr", object);
    4300           0 :         ret = PyUnicode_FromString(retstr);
    4301           0 :         talloc_free(retstr);
    4302             : 
    4303           0 :         return ret;
    4304             : }
    4305             : 
    4306             : static PyMethodDef py_netr_SidAttr_methods[] = {
    4307             :         { "__ndr_pack__", (PyCFunction)py_netr_SidAttr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4308             :         { "__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" },
    4309             :         { "__ndr_print__", (PyCFunction)py_netr_SidAttr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4310             :         { NULL, NULL, 0, NULL }
    4311             : };
    4312             : 
    4313             : 
    4314             : static PyTypeObject netr_SidAttr_Type = {
    4315             :         PyVarObject_HEAD_INIT(NULL, 0)
    4316             :         .tp_name = "netlogon.netr_SidAttr",
    4317             :         .tp_getset = py_netr_SidAttr_getsetters,
    4318             :         .tp_methods = py_netr_SidAttr_methods,
    4319             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4320             :         .tp_new = py_netr_SidAttr_new,
    4321             : };
    4322             : 
    4323             : 
    4324          12 : static PyObject *py_netr_SamInfo3_get_base(PyObject *obj, void *closure)
    4325             : {
    4326          12 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4327             :         PyObject *py_base;
    4328          12 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4329          12 :         return py_base;
    4330             : }
    4331             : 
    4332           0 : static int py_netr_SamInfo3_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4333             : {
    4334           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4335           0 :         if (value == NULL) {
    4336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4337           0 :                 return -1;
    4338             :         }
    4339           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4340           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4341           0 :                 PyErr_NoMemory();
    4342           0 :                 return -1;
    4343             :         }
    4344           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4345           0 :         return 0;
    4346             : }
    4347             : 
    4348           0 : static PyObject *py_netr_SamInfo3_get_sidcount(PyObject *obj, void *closure)
    4349             : {
    4350           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4351             :         PyObject *py_sidcount;
    4352           0 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)object->sidcount);
    4353           0 :         return py_sidcount;
    4354             : }
    4355             : 
    4356           0 : static int py_netr_SamInfo3_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4357             : {
    4358           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4359           0 :         if (value == NULL) {
    4360           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sidcount");
    4361           0 :                 return -1;
    4362             :         }
    4363             :         {
    4364           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4365           0 :                 if (PyLong_Check(value)) {
    4366             :                         unsigned long long test_var;
    4367           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4368           0 :                         if (PyErr_Occurred() != NULL) {
    4369           0 :                                 return -1;
    4370             :                         }
    4371           0 :                         if (test_var > uint_max) {
    4372           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4373             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4374           0 :                                 return -1;
    4375             :                         }
    4376           0 :                         object->sidcount = test_var;
    4377             :                 } else {
    4378           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4379             :                           PyLong_Type.tp_name);
    4380           0 :                         return -1;
    4381             :                 }
    4382             :         }
    4383           0 :         return 0;
    4384             : }
    4385             : 
    4386           0 : static PyObject *py_netr_SamInfo3_get_sids(PyObject *obj, void *closure)
    4387             : {
    4388           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4389             :         PyObject *py_sids;
    4390           0 :         if (object->sids == NULL) {
    4391           0 :                 Py_RETURN_NONE;
    4392             :         }
    4393           0 :         if (object->sids == NULL) {
    4394           0 :                 py_sids = Py_None;
    4395           0 :                 Py_INCREF(py_sids);
    4396             :         } else {
    4397           0 :                 py_sids = PyList_New(object->sidcount);
    4398           0 :                 if (py_sids == NULL) {
    4399           0 :                         return NULL;
    4400             :                 }
    4401             :                 {
    4402             :                         int sids_cntr_1;
    4403           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4404             :                                 PyObject *py_sids_1;
    4405           0 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &object->sids[sids_cntr_1]);
    4406           0 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4407             :                         }
    4408             :                 }
    4409             :         }
    4410           0 :         return py_sids;
    4411             : }
    4412             : 
    4413           0 : static int py_netr_SamInfo3_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4414             : {
    4415           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4416           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4417           0 :         if (value == NULL) {
    4418           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    4419           0 :                 return -1;
    4420             :         }
    4421           0 :         if (value == Py_None) {
    4422           0 :                 object->sids = NULL;
    4423             :         } else {
    4424           0 :                 object->sids = NULL;
    4425           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4426             :                 {
    4427             :                         int sids_cntr_1;
    4428           0 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4429           0 :                         if (!object->sids) { return -1;; }
    4430           0 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4431           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4432           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4433           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_1]");
    4434           0 :                                         return -1;
    4435             :                                 }
    4436           0 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4437           0 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4438           0 :                                         PyErr_NoMemory();
    4439           0 :                                         return -1;
    4440             :                                 }
    4441           0 :                                 object->sids[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4442             :                         }
    4443             :                 }
    4444             :         }
    4445           0 :         return 0;
    4446             : }
    4447             : 
    4448             : static PyGetSetDef py_netr_SamInfo3_getsetters[] = {
    4449             :         {
    4450             :                 .name = discard_const_p(char, "base"),
    4451             :                 .get = py_netr_SamInfo3_get_base,
    4452             :                 .set = py_netr_SamInfo3_set_base,
    4453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4454             :         },
    4455             :         {
    4456             :                 .name = discard_const_p(char, "sidcount"),
    4457             :                 .get = py_netr_SamInfo3_get_sidcount,
    4458             :                 .set = py_netr_SamInfo3_set_sidcount,
    4459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4460             :         },
    4461             :         {
    4462             :                 .name = discard_const_p(char, "sids"),
    4463             :                 .get = py_netr_SamInfo3_get_sids,
    4464             :                 .set = py_netr_SamInfo3_set_sids,
    4465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4466             :         },
    4467             :         { .name = NULL }
    4468             : };
    4469             : 
    4470           0 : static PyObject *py_netr_SamInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4471             : {
    4472           0 :         return pytalloc_new(struct netr_SamInfo3, type);
    4473             : }
    4474             : 
    4475           0 : static PyObject *py_netr_SamInfo3_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4476             : {
    4477           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4478           0 :         PyObject *ret = NULL;
    4479             :         DATA_BLOB blob;
    4480             :         enum ndr_err_code err;
    4481           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4482           0 :         if (tmp_ctx == NULL) {
    4483           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4484           0 :                 return NULL;
    4485             :         }
    4486           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SamInfo3);
    4487           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4488           0 :                 TALLOC_FREE(tmp_ctx);
    4489           0 :                 PyErr_SetNdrError(err);
    4490           0 :                 return NULL;
    4491             :         }
    4492             : 
    4493           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4494           0 :         TALLOC_FREE(tmp_ctx);
    4495           0 :         return ret;
    4496             : }
    4497             : 
    4498           0 : static PyObject *py_netr_SamInfo3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4499             : {
    4500           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4501           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4502           0 :         Py_ssize_t blob_length = 0;
    4503             :         enum ndr_err_code err;
    4504           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4505           0 :         PyObject *allow_remaining_obj = NULL;
    4506           0 :         bool allow_remaining = false;
    4507             : 
    4508           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4509             :                 discard_const_p(char *, kwnames),
    4510             :                 &blob.data, &blob_length,
    4511             :                 &allow_remaining_obj)) {
    4512           0 :                 return NULL;
    4513             :         }
    4514           0 :         blob.length = blob_length;
    4515             : 
    4516           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4517           0 :                 allow_remaining = true;
    4518             :         }
    4519             : 
    4520           0 :         if (allow_remaining) {
    4521           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4522             :         } else {
    4523           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4524             :         }
    4525           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4526           0 :                 PyErr_SetNdrError(err);
    4527           0 :                 return NULL;
    4528             :         }
    4529             : 
    4530           0 :         Py_RETURN_NONE;
    4531             : }
    4532             : 
    4533           0 : static PyObject *py_netr_SamInfo3_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4534             : {
    4535           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4536             :         PyObject *ret;
    4537             :         char *retstr;
    4538             : 
    4539           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo3, "netr_SamInfo3", object);
    4540           0 :         ret = PyUnicode_FromString(retstr);
    4541           0 :         talloc_free(retstr);
    4542             : 
    4543           0 :         return ret;
    4544             : }
    4545             : 
    4546             : static PyMethodDef py_netr_SamInfo3_methods[] = {
    4547             :         { "__ndr_pack__", (PyCFunction)py_netr_SamInfo3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4548             :         { "__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" },
    4549             :         { "__ndr_print__", (PyCFunction)py_netr_SamInfo3_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4550             :         { NULL, NULL, 0, NULL }
    4551             : };
    4552             : 
    4553             : 
    4554             : static PyTypeObject netr_SamInfo3_Type = {
    4555             :         PyVarObject_HEAD_INIT(NULL, 0)
    4556             :         .tp_name = "netlogon.netr_SamInfo3",
    4557             :         .tp_getset = py_netr_SamInfo3_getsetters,
    4558             :         .tp_methods = py_netr_SamInfo3_methods,
    4559             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4560             :         .tp_new = py_netr_SamInfo3_new,
    4561             : };
    4562             : 
    4563             : 
    4564           0 : static PyObject *py_netr_SamInfo6_get_base(PyObject *obj, void *closure)
    4565             : {
    4566           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4567             :         PyObject *py_base;
    4568           0 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4569           0 :         return py_base;
    4570             : }
    4571             : 
    4572           0 : static int py_netr_SamInfo6_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4573             : {
    4574           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4575           0 :         if (value == NULL) {
    4576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4577           0 :                 return -1;
    4578             :         }
    4579           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4580           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4581           0 :                 PyErr_NoMemory();
    4582           0 :                 return -1;
    4583             :         }
    4584           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4585           0 :         return 0;
    4586             : }
    4587             : 
    4588           0 : static PyObject *py_netr_SamInfo6_get_sidcount(PyObject *obj, void *closure)
    4589             : {
    4590           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4591             :         PyObject *py_sidcount;
    4592           0 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)object->sidcount);
    4593           0 :         return py_sidcount;
    4594             : }
    4595             : 
    4596           0 : static int py_netr_SamInfo6_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4597             : {
    4598           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4599           0 :         if (value == NULL) {
    4600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sidcount");
    4601           0 :                 return -1;
    4602             :         }
    4603             :         {
    4604           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4605           0 :                 if (PyLong_Check(value)) {
    4606             :                         unsigned long long test_var;
    4607           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4608           0 :                         if (PyErr_Occurred() != NULL) {
    4609           0 :                                 return -1;
    4610             :                         }
    4611           0 :                         if (test_var > uint_max) {
    4612           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4613             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4614           0 :                                 return -1;
    4615             :                         }
    4616           0 :                         object->sidcount = test_var;
    4617             :                 } else {
    4618           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4619             :                           PyLong_Type.tp_name);
    4620           0 :                         return -1;
    4621             :                 }
    4622             :         }
    4623           0 :         return 0;
    4624             : }
    4625             : 
    4626           0 : static PyObject *py_netr_SamInfo6_get_sids(PyObject *obj, void *closure)
    4627             : {
    4628           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4629             :         PyObject *py_sids;
    4630           0 :         if (object->sids == NULL) {
    4631           0 :                 Py_RETURN_NONE;
    4632             :         }
    4633           0 :         if (object->sids == NULL) {
    4634           0 :                 py_sids = Py_None;
    4635           0 :                 Py_INCREF(py_sids);
    4636             :         } else {
    4637           0 :                 py_sids = PyList_New(object->sidcount);
    4638           0 :                 if (py_sids == NULL) {
    4639           0 :                         return NULL;
    4640             :                 }
    4641             :                 {
    4642             :                         int sids_cntr_1;
    4643           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4644             :                                 PyObject *py_sids_1;
    4645           0 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &object->sids[sids_cntr_1]);
    4646           0 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4647             :                         }
    4648             :                 }
    4649             :         }
    4650           0 :         return py_sids;
    4651             : }
    4652             : 
    4653           0 : static int py_netr_SamInfo6_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4654             : {
    4655           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4656           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4657           0 :         if (value == NULL) {
    4658           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    4659           0 :                 return -1;
    4660             :         }
    4661           0 :         if (value == Py_None) {
    4662           0 :                 object->sids = NULL;
    4663             :         } else {
    4664           0 :                 object->sids = NULL;
    4665           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4666             :                 {
    4667             :                         int sids_cntr_1;
    4668           0 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4669           0 :                         if (!object->sids) { return -1;; }
    4670           0 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4671           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4672           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4673           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_1]");
    4674           0 :                                         return -1;
    4675             :                                 }
    4676           0 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4677           0 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4678           0 :                                         PyErr_NoMemory();
    4679           0 :                                         return -1;
    4680             :                                 }
    4681           0 :                                 object->sids[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4682             :                         }
    4683             :                 }
    4684             :         }
    4685           0 :         return 0;
    4686             : }
    4687             : 
    4688           0 : static PyObject *py_netr_SamInfo6_get_dns_domainname(PyObject *obj, void *closure)
    4689             : {
    4690           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4691             :         PyObject *py_dns_domainname;
    4692           0 :         py_dns_domainname = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
    4693           0 :         return py_dns_domainname;
    4694             : }
    4695             : 
    4696           0 : static int py_netr_SamInfo6_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
    4697             : {
    4698           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4699           0 :         if (value == NULL) {
    4700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domainname");
    4701           0 :                 return -1;
    4702             :         }
    4703           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4704           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4705           0 :                 PyErr_NoMemory();
    4706           0 :                 return -1;
    4707             :         }
    4708           0 :         object->dns_domainname = *(struct lsa_String *)pytalloc_get_ptr(value);
    4709           0 :         return 0;
    4710             : }
    4711             : 
    4712           0 : static PyObject *py_netr_SamInfo6_get_principal_name(PyObject *obj, void *closure)
    4713             : {
    4714           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4715             :         PyObject *py_principal_name;
    4716           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    4717           0 :         return py_principal_name;
    4718             : }
    4719             : 
    4720           0 : static int py_netr_SamInfo6_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    4721             : {
    4722           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4723           0 :         if (value == NULL) {
    4724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principal_name");
    4725           0 :                 return -1;
    4726             :         }
    4727           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4728           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4729           0 :                 PyErr_NoMemory();
    4730           0 :                 return -1;
    4731             :         }
    4732           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    4733           0 :         return 0;
    4734             : }
    4735             : 
    4736           0 : static PyObject *py_netr_SamInfo6_get_unknown4(PyObject *obj, void *closure)
    4737             : {
    4738           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4739             :         PyObject *py_unknown4;
    4740           0 :         py_unknown4 = PyList_New(20);
    4741           0 :         if (py_unknown4 == NULL) {
    4742           0 :                 return NULL;
    4743             :         }
    4744             :         {
    4745             :                 int unknown4_cntr_0;
    4746           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < (20); unknown4_cntr_0++) {
    4747             :                         PyObject *py_unknown4_0;
    4748           0 :                         py_unknown4_0 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4[unknown4_cntr_0]);
    4749           0 :                         PyList_SetItem(py_unknown4, unknown4_cntr_0, py_unknown4_0);
    4750             :                 }
    4751             :         }
    4752           0 :         return py_unknown4;
    4753             : }
    4754             : 
    4755           0 : static int py_netr_SamInfo6_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    4756             : {
    4757           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4758           0 :         if (value == NULL) {
    4759           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    4760           0 :                 return -1;
    4761             :         }
    4762           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4763             :         {
    4764             :                 int unknown4_cntr_0;
    4765           0 :                 if (ARRAY_SIZE(object->unknown4) != PyList_GET_SIZE(value)) {
    4766           0 :                         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));
    4767           0 :                         return -1;
    4768             :                 }
    4769           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < PyList_GET_SIZE(value); unknown4_cntr_0++) {
    4770           0 :                         if (PyList_GET_ITEM(value, unknown4_cntr_0) == NULL) {
    4771           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4[unknown4_cntr_0]");
    4772           0 :                                 return -1;
    4773             :                         }
    4774             :                         {
    4775           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4[unknown4_cntr_0]));
    4776           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, unknown4_cntr_0))) {
    4777             :                                         unsigned long long test_var;
    4778           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown4_cntr_0));
    4779           0 :                                         if (PyErr_Occurred() != NULL) {
    4780           0 :                                                 return -1;
    4781             :                                         }
    4782           0 :                                         if (test_var > uint_max) {
    4783           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4784             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4785           0 :                                                 return -1;
    4786             :                                         }
    4787           0 :                                         object->unknown4[unknown4_cntr_0] = test_var;
    4788             :                                 } else {
    4789           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4790             :                                           PyLong_Type.tp_name);
    4791           0 :                                         return -1;
    4792             :                                 }
    4793             :                         }
    4794             :                 }
    4795             :         }
    4796           0 :         return 0;
    4797             : }
    4798             : 
    4799             : static PyGetSetDef py_netr_SamInfo6_getsetters[] = {
    4800             :         {
    4801             :                 .name = discard_const_p(char, "base"),
    4802             :                 .get = py_netr_SamInfo6_get_base,
    4803             :                 .set = py_netr_SamInfo6_set_base,
    4804             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4805             :         },
    4806             :         {
    4807             :                 .name = discard_const_p(char, "sidcount"),
    4808             :                 .get = py_netr_SamInfo6_get_sidcount,
    4809             :                 .set = py_netr_SamInfo6_set_sidcount,
    4810             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4811             :         },
    4812             :         {
    4813             :                 .name = discard_const_p(char, "sids"),
    4814             :                 .get = py_netr_SamInfo6_get_sids,
    4815             :                 .set = py_netr_SamInfo6_set_sids,
    4816             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4817             :         },
    4818             :         {
    4819             :                 .name = discard_const_p(char, "dns_domainname"),
    4820             :                 .get = py_netr_SamInfo6_get_dns_domainname,
    4821             :                 .set = py_netr_SamInfo6_set_dns_domainname,
    4822             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4823             :         },
    4824             :         {
    4825             :                 .name = discard_const_p(char, "principal_name"),
    4826             :                 .get = py_netr_SamInfo6_get_principal_name,
    4827             :                 .set = py_netr_SamInfo6_set_principal_name,
    4828             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4829             :         },
    4830             :         {
    4831             :                 .name = discard_const_p(char, "unknown4"),
    4832             :                 .get = py_netr_SamInfo6_get_unknown4,
    4833             :                 .set = py_netr_SamInfo6_set_unknown4,
    4834             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4835             :         },
    4836             :         { .name = NULL }
    4837             : };
    4838             : 
    4839           0 : static PyObject *py_netr_SamInfo6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4840             : {
    4841           0 :         return pytalloc_new(struct netr_SamInfo6, type);
    4842             : }
    4843             : 
    4844             : 
    4845             : static PyTypeObject netr_SamInfo6_Type = {
    4846             :         PyVarObject_HEAD_INIT(NULL, 0)
    4847             :         .tp_name = "netlogon.netr_SamInfo6",
    4848             :         .tp_getset = py_netr_SamInfo6_getsetters,
    4849             :         .tp_methods = NULL,
    4850             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4851             :         .tp_new = py_netr_SamInfo6_new,
    4852             : };
    4853             : 
    4854             : 
    4855           0 : static PyObject *py_netr_PacInfo_get_pac_size(PyObject *obj, void *closure)
    4856             : {
    4857           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4858             :         PyObject *py_pac_size;
    4859           0 :         py_pac_size = PyLong_FromUnsignedLongLong((uint32_t)object->pac_size);
    4860           0 :         return py_pac_size;
    4861             : }
    4862             : 
    4863           0 : static int py_netr_PacInfo_set_pac_size(PyObject *py_obj, PyObject *value, void *closure)
    4864             : {
    4865           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4866           0 :         if (value == NULL) {
    4867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac_size");
    4868           0 :                 return -1;
    4869             :         }
    4870             :         {
    4871           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac_size));
    4872           0 :                 if (PyLong_Check(value)) {
    4873             :                         unsigned long long test_var;
    4874           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4875           0 :                         if (PyErr_Occurred() != NULL) {
    4876           0 :                                 return -1;
    4877             :                         }
    4878           0 :                         if (test_var > uint_max) {
    4879           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4880             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4881           0 :                                 return -1;
    4882             :                         }
    4883           0 :                         object->pac_size = test_var;
    4884             :                 } else {
    4885           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4886             :                           PyLong_Type.tp_name);
    4887           0 :                         return -1;
    4888             :                 }
    4889             :         }
    4890           0 :         return 0;
    4891             : }
    4892             : 
    4893           0 : static PyObject *py_netr_PacInfo_get_pac(PyObject *obj, void *closure)
    4894             : {
    4895           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4896             :         PyObject *py_pac;
    4897           0 :         if (object->pac == NULL) {
    4898           0 :                 Py_RETURN_NONE;
    4899             :         }
    4900           0 :         if (object->pac == NULL) {
    4901           0 :                 py_pac = Py_None;
    4902           0 :                 Py_INCREF(py_pac);
    4903             :         } else {
    4904           0 :                 py_pac = PyList_New(object->pac_size);
    4905           0 :                 if (py_pac == NULL) {
    4906           0 :                         return NULL;
    4907             :                 }
    4908             :                 {
    4909             :                         int pac_cntr_1;
    4910           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < (object->pac_size); pac_cntr_1++) {
    4911             :                                 PyObject *py_pac_1;
    4912           0 :                                 py_pac_1 = PyLong_FromLong((uint16_t)object->pac[pac_cntr_1]);
    4913           0 :                                 PyList_SetItem(py_pac, pac_cntr_1, py_pac_1);
    4914             :                         }
    4915             :                 }
    4916             :         }
    4917           0 :         return py_pac;
    4918             : }
    4919             : 
    4920           0 : static int py_netr_PacInfo_set_pac(PyObject *py_obj, PyObject *value, void *closure)
    4921             : {
    4922           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4923           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pac));
    4924           0 :         if (value == NULL) {
    4925           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac");
    4926           0 :                 return -1;
    4927             :         }
    4928           0 :         if (value == Py_None) {
    4929           0 :                 object->pac = NULL;
    4930             :         } else {
    4931           0 :                 object->pac = NULL;
    4932           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4933             :                 {
    4934             :                         int pac_cntr_1;
    4935           0 :                         object->pac = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pac, PyList_GET_SIZE(value));
    4936           0 :                         if (!object->pac) { return -1;; }
    4937           0 :                         talloc_set_name_const(object->pac, "ARRAY: object->pac");
    4938           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < PyList_GET_SIZE(value); pac_cntr_1++) {
    4939           0 :                                 if (PyList_GET_ITEM(value, pac_cntr_1) == NULL) {
    4940           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac[pac_cntr_1]");
    4941           0 :                                         return -1;
    4942             :                                 }
    4943             :                                 {
    4944           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac[pac_cntr_1]));
    4945           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, pac_cntr_1))) {
    4946             :                                                 unsigned long long test_var;
    4947           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, pac_cntr_1));
    4948           0 :                                                 if (PyErr_Occurred() != NULL) {
    4949           0 :                                                         return -1;
    4950             :                                                 }
    4951           0 :                                                 if (test_var > uint_max) {
    4952           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4953             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    4954           0 :                                                         return -1;
    4955             :                                                 }
    4956           0 :                                                 object->pac[pac_cntr_1] = test_var;
    4957             :                                         } else {
    4958           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4959             :                                                   PyLong_Type.tp_name);
    4960           0 :                                                 return -1;
    4961             :                                         }
    4962             :                                 }
    4963             :                         }
    4964             :                 }
    4965             :         }
    4966           0 :         return 0;
    4967             : }
    4968             : 
    4969           0 : static PyObject *py_netr_PacInfo_get_logon_domain(PyObject *obj, void *closure)
    4970             : {
    4971           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4972             :         PyObject *py_logon_domain;
    4973           0 :         py_logon_domain = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    4974           0 :         return py_logon_domain;
    4975             : }
    4976             : 
    4977           0 : static int py_netr_PacInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    4978             : {
    4979           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4980           0 :         if (value == NULL) {
    4981           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_domain");
    4982           0 :                 return -1;
    4983             :         }
    4984           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4985           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4986           0 :                 PyErr_NoMemory();
    4987           0 :                 return -1;
    4988             :         }
    4989           0 :         object->logon_domain = *(struct lsa_String *)pytalloc_get_ptr(value);
    4990           0 :         return 0;
    4991             : }
    4992             : 
    4993           0 : static PyObject *py_netr_PacInfo_get_logon_server(PyObject *obj, void *closure)
    4994             : {
    4995           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4996             :         PyObject *py_logon_server;
    4997           0 :         py_logon_server = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    4998           0 :         return py_logon_server;
    4999             : }
    5000             : 
    5001           0 : static int py_netr_PacInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    5002             : {
    5003           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5004           0 :         if (value == NULL) {
    5005           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_server");
    5006           0 :                 return -1;
    5007             :         }
    5008           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5009           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5010           0 :                 PyErr_NoMemory();
    5011           0 :                 return -1;
    5012             :         }
    5013           0 :         object->logon_server = *(struct lsa_String *)pytalloc_get_ptr(value);
    5014           0 :         return 0;
    5015             : }
    5016             : 
    5017           0 : static PyObject *py_netr_PacInfo_get_principal_name(PyObject *obj, void *closure)
    5018             : {
    5019           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5020             :         PyObject *py_principal_name;
    5021           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    5022           0 :         return py_principal_name;
    5023             : }
    5024             : 
    5025           0 : static int py_netr_PacInfo_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    5026             : {
    5027           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5028           0 :         if (value == NULL) {
    5029           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principal_name");
    5030           0 :                 return -1;
    5031             :         }
    5032           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5033           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5034           0 :                 PyErr_NoMemory();
    5035           0 :                 return -1;
    5036             :         }
    5037           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    5038           0 :         return 0;
    5039             : }
    5040             : 
    5041           0 : static PyObject *py_netr_PacInfo_get_auth_size(PyObject *obj, void *closure)
    5042             : {
    5043           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5044             :         PyObject *py_auth_size;
    5045           0 :         py_auth_size = PyLong_FromUnsignedLongLong((uint32_t)object->auth_size);
    5046           0 :         return py_auth_size;
    5047             : }
    5048             : 
    5049           0 : static int py_netr_PacInfo_set_auth_size(PyObject *py_obj, PyObject *value, void *closure)
    5050             : {
    5051           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5052           0 :         if (value == NULL) {
    5053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_size");
    5054           0 :                 return -1;
    5055             :         }
    5056             :         {
    5057           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_size));
    5058           0 :                 if (PyLong_Check(value)) {
    5059             :                         unsigned long long test_var;
    5060           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5061           0 :                         if (PyErr_Occurred() != NULL) {
    5062           0 :                                 return -1;
    5063             :                         }
    5064           0 :                         if (test_var > uint_max) {
    5065           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5066             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5067           0 :                                 return -1;
    5068             :                         }
    5069           0 :                         object->auth_size = test_var;
    5070             :                 } else {
    5071           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5072             :                           PyLong_Type.tp_name);
    5073           0 :                         return -1;
    5074             :                 }
    5075             :         }
    5076           0 :         return 0;
    5077             : }
    5078             : 
    5079           0 : static PyObject *py_netr_PacInfo_get_auth(PyObject *obj, void *closure)
    5080             : {
    5081           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5082             :         PyObject *py_auth;
    5083           0 :         if (object->auth == NULL) {
    5084           0 :                 Py_RETURN_NONE;
    5085             :         }
    5086           0 :         if (object->auth == NULL) {
    5087           0 :                 py_auth = Py_None;
    5088           0 :                 Py_INCREF(py_auth);
    5089             :         } else {
    5090           0 :                 py_auth = PyList_New(object->auth_size);
    5091           0 :                 if (py_auth == NULL) {
    5092           0 :                         return NULL;
    5093             :                 }
    5094             :                 {
    5095             :                         int auth_cntr_1;
    5096           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < (object->auth_size); auth_cntr_1++) {
    5097             :                                 PyObject *py_auth_1;
    5098           0 :                                 py_auth_1 = PyLong_FromLong((uint16_t)object->auth[auth_cntr_1]);
    5099           0 :                                 PyList_SetItem(py_auth, auth_cntr_1, py_auth_1);
    5100             :                         }
    5101             :                 }
    5102             :         }
    5103           0 :         return py_auth;
    5104             : }
    5105             : 
    5106           0 : static int py_netr_PacInfo_set_auth(PyObject *py_obj, PyObject *value, void *closure)
    5107             : {
    5108           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5109           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->auth));
    5110           0 :         if (value == NULL) {
    5111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth");
    5112           0 :                 return -1;
    5113             :         }
    5114           0 :         if (value == Py_None) {
    5115           0 :                 object->auth = NULL;
    5116             :         } else {
    5117           0 :                 object->auth = NULL;
    5118           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5119             :                 {
    5120             :                         int auth_cntr_1;
    5121           0 :                         object->auth = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->auth, PyList_GET_SIZE(value));
    5122           0 :                         if (!object->auth) { return -1;; }
    5123           0 :                         talloc_set_name_const(object->auth, "ARRAY: object->auth");
    5124           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < PyList_GET_SIZE(value); auth_cntr_1++) {
    5125           0 :                                 if (PyList_GET_ITEM(value, auth_cntr_1) == NULL) {
    5126           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth[auth_cntr_1]");
    5127           0 :                                         return -1;
    5128             :                                 }
    5129             :                                 {
    5130           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth[auth_cntr_1]));
    5131           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, auth_cntr_1))) {
    5132             :                                                 unsigned long long test_var;
    5133           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, auth_cntr_1));
    5134           0 :                                                 if (PyErr_Occurred() != NULL) {
    5135           0 :                                                         return -1;
    5136             :                                                 }
    5137           0 :                                                 if (test_var > uint_max) {
    5138           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5139             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5140           0 :                                                         return -1;
    5141             :                                                 }
    5142           0 :                                                 object->auth[auth_cntr_1] = test_var;
    5143             :                                         } else {
    5144           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5145             :                                                   PyLong_Type.tp_name);
    5146           0 :                                                 return -1;
    5147             :                                         }
    5148             :                                 }
    5149             :                         }
    5150             :                 }
    5151             :         }
    5152           0 :         return 0;
    5153             : }
    5154             : 
    5155           0 : static PyObject *py_netr_PacInfo_get_user_session_key(PyObject *obj, void *closure)
    5156             : {
    5157           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5158             :         PyObject *py_user_session_key;
    5159           0 :         py_user_session_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->user_session_key);
    5160           0 :         return py_user_session_key;
    5161             : }
    5162             : 
    5163           0 : static int py_netr_PacInfo_set_user_session_key(PyObject *py_obj, PyObject *value, void *closure)
    5164             : {
    5165           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5166           0 :         if (value == NULL) {
    5167           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_session_key");
    5168           0 :                 return -1;
    5169             :         }
    5170           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    5171           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5172           0 :                 PyErr_NoMemory();
    5173           0 :                 return -1;
    5174             :         }
    5175           0 :         object->user_session_key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    5176           0 :         return 0;
    5177             : }
    5178             : 
    5179           0 : static PyObject *py_netr_PacInfo_get_expansionroom(PyObject *obj, void *closure)
    5180             : {
    5181           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5182             :         PyObject *py_expansionroom;
    5183           0 :         py_expansionroom = PyList_New(10);
    5184           0 :         if (py_expansionroom == NULL) {
    5185           0 :                 return NULL;
    5186             :         }
    5187             :         {
    5188             :                 int expansionroom_cntr_0;
    5189           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < (10); expansionroom_cntr_0++) {
    5190             :                         PyObject *py_expansionroom_0;
    5191           0 :                         py_expansionroom_0 = PyLong_FromUnsignedLongLong((uint32_t)object->expansionroom[expansionroom_cntr_0]);
    5192           0 :                         PyList_SetItem(py_expansionroom, expansionroom_cntr_0, py_expansionroom_0);
    5193             :                 }
    5194             :         }
    5195           0 :         return py_expansionroom;
    5196             : }
    5197             : 
    5198           0 : static int py_netr_PacInfo_set_expansionroom(PyObject *py_obj, PyObject *value, void *closure)
    5199             : {
    5200           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5201           0 :         if (value == NULL) {
    5202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->expansionroom");
    5203           0 :                 return -1;
    5204             :         }
    5205           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5206             :         {
    5207             :                 int expansionroom_cntr_0;
    5208           0 :                 if (ARRAY_SIZE(object->expansionroom) != PyList_GET_SIZE(value)) {
    5209           0 :                         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));
    5210           0 :                         return -1;
    5211             :                 }
    5212           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < PyList_GET_SIZE(value); expansionroom_cntr_0++) {
    5213           0 :                         if (PyList_GET_ITEM(value, expansionroom_cntr_0) == NULL) {
    5214           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->expansionroom[expansionroom_cntr_0]");
    5215           0 :                                 return -1;
    5216             :                         }
    5217             :                         {
    5218           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->expansionroom[expansionroom_cntr_0]));
    5219           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, expansionroom_cntr_0))) {
    5220             :                                         unsigned long long test_var;
    5221           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, expansionroom_cntr_0));
    5222           0 :                                         if (PyErr_Occurred() != NULL) {
    5223           0 :                                                 return -1;
    5224             :                                         }
    5225           0 :                                         if (test_var > uint_max) {
    5226           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5227             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5228           0 :                                                 return -1;
    5229             :                                         }
    5230           0 :                                         object->expansionroom[expansionroom_cntr_0] = test_var;
    5231             :                                 } else {
    5232           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5233             :                                           PyLong_Type.tp_name);
    5234           0 :                                         return -1;
    5235             :                                 }
    5236             :                         }
    5237             :                 }
    5238             :         }
    5239           0 :         return 0;
    5240             : }
    5241             : 
    5242           0 : static PyObject *py_netr_PacInfo_get_unknown1(PyObject *obj, void *closure)
    5243             : {
    5244           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5245             :         PyObject *py_unknown1;
    5246           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    5247           0 :         return py_unknown1;
    5248             : }
    5249             : 
    5250           0 : static int py_netr_PacInfo_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    5251             : {
    5252           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5253           0 :         if (value == NULL) {
    5254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    5255           0 :                 return -1;
    5256             :         }
    5257           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5258           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5259           0 :                 PyErr_NoMemory();
    5260           0 :                 return -1;
    5261             :         }
    5262           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5263           0 :         return 0;
    5264             : }
    5265             : 
    5266           0 : static PyObject *py_netr_PacInfo_get_unknown2(PyObject *obj, void *closure)
    5267             : {
    5268           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5269             :         PyObject *py_unknown2;
    5270           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    5271           0 :         return py_unknown2;
    5272             : }
    5273             : 
    5274           0 : static int py_netr_PacInfo_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    5275             : {
    5276           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5277           0 :         if (value == NULL) {
    5278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    5279           0 :                 return -1;
    5280             :         }
    5281           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5282           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5283           0 :                 PyErr_NoMemory();
    5284           0 :                 return -1;
    5285             :         }
    5286           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5287           0 :         return 0;
    5288             : }
    5289             : 
    5290           0 : static PyObject *py_netr_PacInfo_get_unknown3(PyObject *obj, void *closure)
    5291             : {
    5292           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5293             :         PyObject *py_unknown3;
    5294           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    5295           0 :         return py_unknown3;
    5296             : }
    5297             : 
    5298           0 : static int py_netr_PacInfo_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    5299             : {
    5300           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5301           0 :         if (value == NULL) {
    5302           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    5303           0 :                 return -1;
    5304             :         }
    5305           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5306           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5307           0 :                 PyErr_NoMemory();
    5308           0 :                 return -1;
    5309             :         }
    5310           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5311           0 :         return 0;
    5312             : }
    5313             : 
    5314           0 : static PyObject *py_netr_PacInfo_get_unknown4(PyObject *obj, void *closure)
    5315             : {
    5316           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5317             :         PyObject *py_unknown4;
    5318           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    5319           0 :         return py_unknown4;
    5320             : }
    5321             : 
    5322           0 : static int py_netr_PacInfo_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    5323             : {
    5324           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5325           0 :         if (value == NULL) {
    5326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    5327           0 :                 return -1;
    5328             :         }
    5329           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5330           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5331           0 :                 PyErr_NoMemory();
    5332           0 :                 return -1;
    5333             :         }
    5334           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5335           0 :         return 0;
    5336             : }
    5337             : 
    5338             : static PyGetSetDef py_netr_PacInfo_getsetters[] = {
    5339             :         {
    5340             :                 .name = discard_const_p(char, "pac_size"),
    5341             :                 .get = py_netr_PacInfo_get_pac_size,
    5342             :                 .set = py_netr_PacInfo_set_pac_size,
    5343             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5344             :         },
    5345             :         {
    5346             :                 .name = discard_const_p(char, "pac"),
    5347             :                 .get = py_netr_PacInfo_get_pac,
    5348             :                 .set = py_netr_PacInfo_set_pac,
    5349             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5350             :         },
    5351             :         {
    5352             :                 .name = discard_const_p(char, "logon_domain"),
    5353             :                 .get = py_netr_PacInfo_get_logon_domain,
    5354             :                 .set = py_netr_PacInfo_set_logon_domain,
    5355             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5356             :         },
    5357             :         {
    5358             :                 .name = discard_const_p(char, "logon_server"),
    5359             :                 .get = py_netr_PacInfo_get_logon_server,
    5360             :                 .set = py_netr_PacInfo_set_logon_server,
    5361             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5362             :         },
    5363             :         {
    5364             :                 .name = discard_const_p(char, "principal_name"),
    5365             :                 .get = py_netr_PacInfo_get_principal_name,
    5366             :                 .set = py_netr_PacInfo_set_principal_name,
    5367             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5368             :         },
    5369             :         {
    5370             :                 .name = discard_const_p(char, "auth_size"),
    5371             :                 .get = py_netr_PacInfo_get_auth_size,
    5372             :                 .set = py_netr_PacInfo_set_auth_size,
    5373             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5374             :         },
    5375             :         {
    5376             :                 .name = discard_const_p(char, "auth"),
    5377             :                 .get = py_netr_PacInfo_get_auth,
    5378             :                 .set = py_netr_PacInfo_set_auth,
    5379             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5380             :         },
    5381             :         {
    5382             :                 .name = discard_const_p(char, "user_session_key"),
    5383             :                 .get = py_netr_PacInfo_get_user_session_key,
    5384             :                 .set = py_netr_PacInfo_set_user_session_key,
    5385             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    5386             :         },
    5387             :         {
    5388             :                 .name = discard_const_p(char, "expansionroom"),
    5389             :                 .get = py_netr_PacInfo_get_expansionroom,
    5390             :                 .set = py_netr_PacInfo_set_expansionroom,
    5391             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5392             :         },
    5393             :         {
    5394             :                 .name = discard_const_p(char, "unknown1"),
    5395             :                 .get = py_netr_PacInfo_get_unknown1,
    5396             :                 .set = py_netr_PacInfo_set_unknown1,
    5397             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5398             :         },
    5399             :         {
    5400             :                 .name = discard_const_p(char, "unknown2"),
    5401             :                 .get = py_netr_PacInfo_get_unknown2,
    5402             :                 .set = py_netr_PacInfo_set_unknown2,
    5403             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5404             :         },
    5405             :         {
    5406             :                 .name = discard_const_p(char, "unknown3"),
    5407             :                 .get = py_netr_PacInfo_get_unknown3,
    5408             :                 .set = py_netr_PacInfo_set_unknown3,
    5409             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5410             :         },
    5411             :         {
    5412             :                 .name = discard_const_p(char, "unknown4"),
    5413             :                 .get = py_netr_PacInfo_get_unknown4,
    5414             :                 .set = py_netr_PacInfo_set_unknown4,
    5415             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5416             :         },
    5417             :         { .name = NULL }
    5418             : };
    5419             : 
    5420           0 : static PyObject *py_netr_PacInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5421             : {
    5422           0 :         return pytalloc_new(struct netr_PacInfo, type);
    5423             : }
    5424             : 
    5425             : 
    5426             : static PyTypeObject netr_PacInfo_Type = {
    5427             :         PyVarObject_HEAD_INIT(NULL, 0)
    5428             :         .tp_name = "netlogon.netr_PacInfo",
    5429             :         .tp_getset = py_netr_PacInfo_getsetters,
    5430             :         .tp_methods = NULL,
    5431             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5432             :         .tp_new = py_netr_PacInfo_new,
    5433             : };
    5434             : 
    5435             : 
    5436           0 : static PyObject *py_netr_GenericInfo2_get_length(PyObject *obj, void *closure)
    5437             : {
    5438           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(obj);
    5439             :         PyObject *py_length;
    5440           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
    5441           0 :         return py_length;
    5442             : }
    5443             : 
    5444           0 : static int py_netr_GenericInfo2_set_length(PyObject *py_obj, PyObject *value, void *closure)
    5445             : {
    5446           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(py_obj);
    5447           0 :         if (value == NULL) {
    5448           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    5449           0 :                 return -1;
    5450             :         }
    5451             :         {
    5452           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    5453           0 :                 if (PyLong_Check(value)) {
    5454             :                         unsigned long long test_var;
    5455           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5456           0 :                         if (PyErr_Occurred() != NULL) {
    5457           0 :                                 return -1;
    5458             :                         }
    5459           0 :                         if (test_var > uint_max) {
    5460           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5461             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5462           0 :                                 return -1;
    5463             :                         }
    5464           0 :                         object->length = test_var;
    5465             :                 } else {
    5466           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5467             :                           PyLong_Type.tp_name);
    5468           0 :                         return -1;
    5469             :                 }
    5470             :         }
    5471           0 :         return 0;
    5472             : }
    5473             : 
    5474           0 : static PyObject *py_netr_GenericInfo2_get_data(PyObject *obj, void *closure)
    5475             : {
    5476           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(obj);
    5477             :         PyObject *py_data;
    5478           0 :         if (object->data == NULL) {
    5479           0 :                 Py_RETURN_NONE;
    5480             :         }
    5481           0 :         if (object->data == NULL) {
    5482           0 :                 py_data = Py_None;
    5483           0 :                 Py_INCREF(py_data);
    5484             :         } else {
    5485           0 :                 py_data = PyList_New(object->length);
    5486           0 :                 if (py_data == NULL) {
    5487           0 :                         return NULL;
    5488             :                 }
    5489             :                 {
    5490             :                         int data_cntr_1;
    5491           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    5492             :                                 PyObject *py_data_1;
    5493           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    5494           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    5495             :                         }
    5496             :                 }
    5497             :         }
    5498           0 :         return py_data;
    5499             : }
    5500             : 
    5501           0 : static int py_netr_GenericInfo2_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5502             : {
    5503           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(py_obj);
    5504           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    5505           0 :         if (value == NULL) {
    5506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    5507           0 :                 return -1;
    5508             :         }
    5509           0 :         if (value == Py_None) {
    5510           0 :                 object->data = NULL;
    5511             :         } else {
    5512           0 :                 object->data = NULL;
    5513           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5514             :                 {
    5515             :                         int data_cntr_1;
    5516           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    5517           0 :                         if (!object->data) { return -1;; }
    5518           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    5519           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    5520           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    5521           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    5522           0 :                                         return -1;
    5523             :                                 }
    5524             :                                 {
    5525           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    5526           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    5527             :                                                 unsigned long long test_var;
    5528           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    5529           0 :                                                 if (PyErr_Occurred() != NULL) {
    5530           0 :                                                         return -1;
    5531             :                                                 }
    5532           0 :                                                 if (test_var > uint_max) {
    5533           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5534             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5535           0 :                                                         return -1;
    5536             :                                                 }
    5537           0 :                                                 object->data[data_cntr_1] = test_var;
    5538             :                                         } else {
    5539           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5540             :                                                   PyLong_Type.tp_name);
    5541           0 :                                                 return -1;
    5542             :                                         }
    5543             :                                 }
    5544             :                         }
    5545             :                 }
    5546             :         }
    5547           0 :         return 0;
    5548             : }
    5549             : 
    5550             : static PyGetSetDef py_netr_GenericInfo2_getsetters[] = {
    5551             :         {
    5552             :                 .name = discard_const_p(char, "length"),
    5553             :                 .get = py_netr_GenericInfo2_get_length,
    5554             :                 .set = py_netr_GenericInfo2_set_length,
    5555             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5556             :         },
    5557             :         {
    5558             :                 .name = discard_const_p(char, "data"),
    5559             :                 .get = py_netr_GenericInfo2_get_data,
    5560             :                 .set = py_netr_GenericInfo2_set_data,
    5561             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5562             :         },
    5563             :         { .name = NULL }
    5564             : };
    5565             : 
    5566           0 : static PyObject *py_netr_GenericInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5567             : {
    5568           0 :         return pytalloc_new(struct netr_GenericInfo2, type);
    5569             : }
    5570             : 
    5571             : 
    5572             : static PyTypeObject netr_GenericInfo2_Type = {
    5573             :         PyVarObject_HEAD_INIT(NULL, 0)
    5574             :         .tp_name = "netlogon.netr_GenericInfo2",
    5575             :         .tp_getset = py_netr_GenericInfo2_getsetters,
    5576             :         .tp_methods = NULL,
    5577             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5578             :         .tp_new = py_netr_GenericInfo2_new,
    5579             : };
    5580             : 
    5581          19 : static PyObject *py_import_netr_Validation(TALLOC_CTX *mem_ctx, int level, union netr_Validation *in)
    5582             : {
    5583             :         PyObject *ret;
    5584             : 
    5585          19 :         switch (level) {
    5586           0 :                 case NetlogonValidationSamInfo:
    5587           0 :                         if (in->sam2 == NULL) {
    5588           0 :                                 ret = Py_None;
    5589           0 :                                 Py_INCREF(ret);
    5590             :                         } else {
    5591           0 :                                 ret = pytalloc_reference_ex(&netr_SamInfo2_Type, in->sam2, in->sam2);
    5592             :                         }
    5593           0 :                         return ret;
    5594             : 
    5595           0 :                 case NetlogonValidationSamInfo2:
    5596           0 :                         if (in->sam3 == NULL) {
    5597           0 :                                 ret = Py_None;
    5598           0 :                                 Py_INCREF(ret);
    5599             :                         } else {
    5600           0 :                                 ret = pytalloc_reference_ex(&netr_SamInfo3_Type, in->sam3, in->sam3);
    5601             :                         }
    5602           0 :                         return ret;
    5603             : 
    5604           0 :                 case 4:
    5605           0 :                         if (in->pac == NULL) {
    5606           0 :                                 ret = Py_None;
    5607           0 :                                 Py_INCREF(ret);
    5608             :                         } else {
    5609           0 :                                 ret = pytalloc_reference_ex(&netr_PacInfo_Type, in->pac, in->pac);
    5610             :                         }
    5611           0 :                         return ret;
    5612             : 
    5613           0 :                 case NetlogonValidationGenericInfo2:
    5614           0 :                         if (in->generic == NULL) {
    5615           0 :                                 ret = Py_None;
    5616           0 :                                 Py_INCREF(ret);
    5617             :                         } else {
    5618           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo2_Type, in->generic, in->generic);
    5619             :                         }
    5620           0 :                         return ret;
    5621             : 
    5622          19 :                 case NetlogonValidationSamInfo4:
    5623          19 :                         if (in->sam6 == NULL) {
    5624           3 :                                 ret = Py_None;
    5625           3 :                                 Py_INCREF(ret);
    5626             :                         } else {
    5627          16 :                                 ret = pytalloc_reference_ex(&netr_SamInfo6_Type, in->sam6, in->sam6);
    5628             :                         }
    5629          19 :                         return ret;
    5630             : 
    5631           0 :                 default:
    5632           0 :                         ret = Py_None;
    5633           0 :                         Py_INCREF(ret);
    5634           0 :                         return ret;
    5635             : 
    5636             :         }
    5637             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    5638             :         return NULL;
    5639             : }
    5640             : 
    5641           0 : static union netr_Validation *py_export_netr_Validation(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    5642             : {
    5643           0 :         union netr_Validation *ret = talloc_zero(mem_ctx, union netr_Validation);
    5644           0 :         switch (level) {
    5645           0 :                 case NetlogonValidationSamInfo:
    5646           0 :                         if (in == NULL) {
    5647           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam2");
    5648           0 :                                 talloc_free(ret); return NULL;
    5649             :                         }
    5650           0 :                         if (in == Py_None) {
    5651           0 :                                 ret->sam2 = NULL;
    5652             :                         } else {
    5653           0 :                                 ret->sam2 = NULL;
    5654           0 :                                 PY_CHECK_TYPE(&netr_SamInfo2_Type, in, talloc_free(ret); return NULL;);
    5655           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5656           0 :                                         PyErr_NoMemory();
    5657           0 :                                         talloc_free(ret); return NULL;
    5658             :                                 }
    5659           0 :                                 ret->sam2 = (struct netr_SamInfo2 *)pytalloc_get_ptr(in);
    5660             :                         }
    5661           0 :                         break;
    5662             : 
    5663           0 :                 case NetlogonValidationSamInfo2:
    5664           0 :                         if (in == NULL) {
    5665           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam3");
    5666           0 :                                 talloc_free(ret); return NULL;
    5667             :                         }
    5668           0 :                         if (in == Py_None) {
    5669           0 :                                 ret->sam3 = NULL;
    5670             :                         } else {
    5671           0 :                                 ret->sam3 = NULL;
    5672           0 :                                 PY_CHECK_TYPE(&netr_SamInfo3_Type, in, talloc_free(ret); return NULL;);
    5673           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5674           0 :                                         PyErr_NoMemory();
    5675           0 :                                         talloc_free(ret); return NULL;
    5676             :                                 }
    5677           0 :                                 ret->sam3 = (struct netr_SamInfo3 *)pytalloc_get_ptr(in);
    5678             :                         }
    5679           0 :                         break;
    5680             : 
    5681           0 :                 case 4:
    5682           0 :                         if (in == NULL) {
    5683           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->pac");
    5684           0 :                                 talloc_free(ret); return NULL;
    5685             :                         }
    5686           0 :                         if (in == Py_None) {
    5687           0 :                                 ret->pac = NULL;
    5688             :                         } else {
    5689           0 :                                 ret->pac = NULL;
    5690           0 :                                 PY_CHECK_TYPE(&netr_PacInfo_Type, in, talloc_free(ret); return NULL;);
    5691           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5692           0 :                                         PyErr_NoMemory();
    5693           0 :                                         talloc_free(ret); return NULL;
    5694             :                                 }
    5695           0 :                                 ret->pac = (struct netr_PacInfo *)pytalloc_get_ptr(in);
    5696             :                         }
    5697           0 :                         break;
    5698             : 
    5699           0 :                 case NetlogonValidationGenericInfo2:
    5700           0 :                         if (in == NULL) {
    5701           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->generic");
    5702           0 :                                 talloc_free(ret); return NULL;
    5703             :                         }
    5704           0 :                         if (in == Py_None) {
    5705           0 :                                 ret->generic = NULL;
    5706             :                         } else {
    5707           0 :                                 ret->generic = NULL;
    5708           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo2_Type, in, talloc_free(ret); return NULL;);
    5709           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5710           0 :                                         PyErr_NoMemory();
    5711           0 :                                         talloc_free(ret); return NULL;
    5712             :                                 }
    5713           0 :                                 ret->generic = (struct netr_GenericInfo2 *)pytalloc_get_ptr(in);
    5714             :                         }
    5715           0 :                         break;
    5716             : 
    5717           0 :                 case NetlogonValidationSamInfo4:
    5718           0 :                         if (in == NULL) {
    5719           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam6");
    5720           0 :                                 talloc_free(ret); return NULL;
    5721             :                         }
    5722           0 :                         if (in == Py_None) {
    5723           0 :                                 ret->sam6 = NULL;
    5724             :                         } else {
    5725           0 :                                 ret->sam6 = NULL;
    5726           0 :                                 PY_CHECK_TYPE(&netr_SamInfo6_Type, in, talloc_free(ret); return NULL;);
    5727           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5728           0 :                                         PyErr_NoMemory();
    5729           0 :                                         talloc_free(ret); return NULL;
    5730             :                                 }
    5731           0 :                                 ret->sam6 = (struct netr_SamInfo6 *)pytalloc_get_ptr(in);
    5732             :                         }
    5733           0 :                         break;
    5734             : 
    5735           0 :                 default:
    5736           0 :                         break;
    5737             : 
    5738             :         }
    5739             : 
    5740           0 :         return ret;
    5741             : }
    5742             : 
    5743          19 : static PyObject *py_netr_Validation_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5744             : {
    5745          19 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5746          19 :         PyObject *mem_ctx_obj = NULL;
    5747          19 :         TALLOC_CTX *mem_ctx = NULL;
    5748          19 :         int level = 0;
    5749          19 :         PyObject *in_obj = NULL;
    5750          19 :         union netr_Validation *in = NULL;
    5751             : 
    5752          19 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    5753             :                 discard_const_p(char *, kwnames),
    5754             :                 &mem_ctx_obj,
    5755             :                 &level,
    5756             :                 &in_obj)) {
    5757           0 :                 return NULL;
    5758             :         }
    5759          19 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5760          19 :         if (mem_ctx == NULL) {
    5761           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5762           0 :                 return NULL;
    5763             :         }
    5764          19 :         in = (union netr_Validation *)pytalloc_get_ptr(in_obj);
    5765          19 :         if (in == NULL) {
    5766           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Validation!");
    5767           0 :                 return NULL;
    5768             :         }
    5769             : 
    5770          19 :         return py_import_netr_Validation(mem_ctx, level, in);
    5771             : }
    5772             : 
    5773           0 : static PyObject *py_netr_Validation_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5774             : {
    5775           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5776           0 :         PyObject *mem_ctx_obj = NULL;
    5777           0 :         TALLOC_CTX *mem_ctx = NULL;
    5778           0 :         int level = 0;
    5779           0 :         PyObject *in = NULL;
    5780           0 :         union netr_Validation *out = NULL;
    5781             : 
    5782           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    5783             :                 discard_const_p(char *, kwnames),
    5784             :                 &mem_ctx_obj,
    5785             :                 &level,
    5786             :                 &in)) {
    5787           0 :                 return NULL;
    5788             :         }
    5789           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5790           0 :         if (mem_ctx == NULL) {
    5791           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5792           0 :                 return NULL;
    5793             :         }
    5794             : 
    5795           0 :         out = py_export_netr_Validation(mem_ctx, level, in);
    5796           0 :         if (out == NULL) {
    5797           0 :                 return NULL;
    5798             :         }
    5799             : 
    5800           0 :         return pytalloc_GenericObject_reference(out);
    5801             : }
    5802             : 
    5803             : static PyMethodDef py_netr_Validation_methods[] = {
    5804             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_import),
    5805             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5806             :                 "T.__import__(mem_ctx, level, in) => ret." },
    5807             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_export),
    5808             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5809             :                 "T.__export__(mem_ctx, level, in) => ret." },
    5810             :         { NULL, NULL, 0, NULL }
    5811             : };
    5812             : 
    5813           0 : static PyObject *py_netr_Validation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5814             : {
    5815           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    5816           0 :         return NULL;
    5817             : }
    5818             : 
    5819             : 
    5820             : static PyTypeObject netr_Validation_Type = {
    5821             :         PyVarObject_HEAD_INIT(NULL, 0)
    5822             :         .tp_name = "netlogon.netr_Validation",
    5823             :         .tp_getset = NULL,
    5824             :         .tp_methods = py_netr_Validation_methods,
    5825             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5826             :         .tp_new = py_netr_Validation_new,
    5827             : };
    5828             : 
    5829             : 
    5830           0 : static PyObject *py_netr_Credential_get_data(PyObject *obj, void *closure)
    5831             : {
    5832           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(obj);
    5833             :         PyObject *py_data;
    5834           0 :         py_data = PyList_New(8);
    5835           0 :         if (py_data == NULL) {
    5836           0 :                 return NULL;
    5837             :         }
    5838             :         {
    5839             :                 int data_cntr_0;
    5840           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (8); data_cntr_0++) {
    5841             :                         PyObject *py_data_0;
    5842           0 :                         py_data_0 = PyLong_FromLong((uint16_t)object->data[data_cntr_0]);
    5843           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
    5844             :                 }
    5845             :         }
    5846           0 :         return py_data;
    5847             : }
    5848             : 
    5849          19 : static int py_netr_Credential_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5850             : {
    5851          19 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5852          19 :         if (value == NULL) {
    5853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    5854           0 :                 return -1;
    5855             :         }
    5856          19 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5857             :         {
    5858             :                 int data_cntr_0;
    5859          19 :                 if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
    5860           0 :                         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));
    5861           0 :                         return -1;
    5862             :                 }
    5863         171 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
    5864         152 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
    5865           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_0]");
    5866           0 :                                 return -1;
    5867             :                         }
    5868             :                         {
    5869         152 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_0]));
    5870         152 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
    5871             :                                         unsigned long long test_var;
    5872         152 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
    5873         152 :                                         if (PyErr_Occurred() != NULL) {
    5874           0 :                                                 return -1;
    5875             :                                         }
    5876         152 :                                         if (test_var > uint_max) {
    5877           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5878             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5879           0 :                                                 return -1;
    5880             :                                         }
    5881         152 :                                         object->data[data_cntr_0] = test_var;
    5882             :                                 } else {
    5883           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5884             :                                           PyLong_Type.tp_name);
    5885           0 :                                         return -1;
    5886             :                                 }
    5887             :                         }
    5888             :                 }
    5889             :         }
    5890          19 :         return 0;
    5891             : }
    5892             : 
    5893             : static PyGetSetDef py_netr_Credential_getsetters[] = {
    5894             :         {
    5895             :                 .name = discard_const_p(char, "data"),
    5896             :                 .get = py_netr_Credential_get_data,
    5897             :                 .set = py_netr_Credential_set_data,
    5898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5899             :         },
    5900             :         { .name = NULL }
    5901             : };
    5902             : 
    5903           4 : static PyObject *py_netr_Credential_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5904             : {
    5905           4 :         return pytalloc_new(struct netr_Credential, type);
    5906             : }
    5907             : 
    5908           0 : static PyObject *py_netr_Credential_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5909             : {
    5910           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5911           0 :         PyObject *ret = NULL;
    5912             :         DATA_BLOB blob;
    5913             :         enum ndr_err_code err;
    5914           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5915           0 :         if (tmp_ctx == NULL) {
    5916           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5917           0 :                 return NULL;
    5918             :         }
    5919           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Credential);
    5920           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5921           0 :                 TALLOC_FREE(tmp_ctx);
    5922           0 :                 PyErr_SetNdrError(err);
    5923           0 :                 return NULL;
    5924             :         }
    5925             : 
    5926           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5927           0 :         TALLOC_FREE(tmp_ctx);
    5928           0 :         return ret;
    5929             : }
    5930             : 
    5931           0 : static PyObject *py_netr_Credential_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5932             : {
    5933           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5934           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5935           0 :         Py_ssize_t blob_length = 0;
    5936             :         enum ndr_err_code err;
    5937           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5938           0 :         PyObject *allow_remaining_obj = NULL;
    5939           0 :         bool allow_remaining = false;
    5940             : 
    5941           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5942             :                 discard_const_p(char *, kwnames),
    5943             :                 &blob.data, &blob_length,
    5944             :                 &allow_remaining_obj)) {
    5945           0 :                 return NULL;
    5946             :         }
    5947           0 :         blob.length = blob_length;
    5948             : 
    5949           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5950           0 :                 allow_remaining = true;
    5951             :         }
    5952             : 
    5953           0 :         if (allow_remaining) {
    5954           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5955             :         } else {
    5956           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5957             :         }
    5958           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5959           0 :                 PyErr_SetNdrError(err);
    5960           0 :                 return NULL;
    5961             :         }
    5962             : 
    5963           0 :         Py_RETURN_NONE;
    5964             : }
    5965             : 
    5966           0 : static PyObject *py_netr_Credential_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5967             : {
    5968           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5969             :         PyObject *ret;
    5970             :         char *retstr;
    5971             : 
    5972           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Credential, "netr_Credential", object);
    5973           0 :         ret = PyUnicode_FromString(retstr);
    5974           0 :         talloc_free(retstr);
    5975             : 
    5976           0 :         return ret;
    5977             : }
    5978             : 
    5979             : static PyMethodDef py_netr_Credential_methods[] = {
    5980             :         { "__ndr_pack__", (PyCFunction)py_netr_Credential_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5981             :         { "__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" },
    5982             :         { "__ndr_print__", (PyCFunction)py_netr_Credential_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5983             :         { NULL, NULL, 0, NULL }
    5984             : };
    5985             : 
    5986             : 
    5987             : static PyTypeObject netr_Credential_Type = {
    5988             :         PyVarObject_HEAD_INIT(NULL, 0)
    5989             :         .tp_name = "netlogon.netr_Credential",
    5990             :         .tp_getset = py_netr_Credential_getsetters,
    5991             :         .tp_methods = py_netr_Credential_methods,
    5992             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5993             :         .tp_new = py_netr_Credential_new,
    5994             : };
    5995             : 
    5996             : 
    5997          19 : static PyObject *py_netr_Authenticator_get_cred(PyObject *obj, void *closure)
    5998             : {
    5999          19 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(obj);
    6000             :         PyObject *py_cred;
    6001          19 :         py_cred = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->cred);
    6002          19 :         return py_cred;
    6003             : }
    6004             : 
    6005           0 : static int py_netr_Authenticator_set_cred(PyObject *py_obj, PyObject *value, void *closure)
    6006             : {
    6007           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6008           0 :         if (value == NULL) {
    6009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cred");
    6010           0 :                 return -1;
    6011             :         }
    6012           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6013           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6014           0 :                 PyErr_NoMemory();
    6015           0 :                 return -1;
    6016             :         }
    6017           0 :         object->cred = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6018           0 :         return 0;
    6019             : }
    6020             : 
    6021           0 : static PyObject *py_netr_Authenticator_get_timestamp(PyObject *obj, void *closure)
    6022             : {
    6023           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(obj);
    6024             :         PyObject *py_timestamp;
    6025           0 :         py_timestamp = PyLong_FromLong(object->timestamp);
    6026           0 :         return py_timestamp;
    6027             : }
    6028             : 
    6029          19 : static int py_netr_Authenticator_set_timestamp(PyObject *py_obj, PyObject *value, void *closure)
    6030             : {
    6031          19 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6032          19 :         if (value == NULL) {
    6033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timestamp");
    6034           0 :                 return -1;
    6035             :         }
    6036             :         {
    6037          19 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->timestamp));
    6038          19 :                 const long long int_min = -int_max - 1;
    6039          19 :                 if (PyLong_Check(value)) {
    6040             :                         long long test_var;
    6041          19 :                         test_var = PyLong_AsLongLong(value);
    6042          19 :                         if (PyErr_Occurred() != NULL) {
    6043           0 :                                 return -1;
    6044             :                         }
    6045          19 :                         if (test_var < int_min || test_var > int_max) {
    6046           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    6047             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    6048           0 :                                 return -1;
    6049             :                         }
    6050          19 :                         object->timestamp = test_var;
    6051             :                 } else {
    6052           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6053             :                           PyLong_Type.tp_name);
    6054           0 :                         return -1;
    6055             :                 }
    6056             :         }
    6057          19 :         return 0;
    6058             : }
    6059             : 
    6060             : static PyGetSetDef py_netr_Authenticator_getsetters[] = {
    6061             :         {
    6062             :                 .name = discard_const_p(char, "cred"),
    6063             :                 .get = py_netr_Authenticator_get_cred,
    6064             :                 .set = py_netr_Authenticator_set_cred,
    6065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6066             :         },
    6067             :         {
    6068             :                 .name = discard_const_p(char, "timestamp"),
    6069             :                 .get = py_netr_Authenticator_get_timestamp,
    6070             :                 .set = py_netr_Authenticator_set_timestamp,
    6071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
    6072             :         },
    6073             :         { .name = NULL }
    6074             : };
    6075             : 
    6076          38 : static PyObject *py_netr_Authenticator_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6077             : {
    6078          38 :         return pytalloc_new(struct netr_Authenticator, type);
    6079             : }
    6080             : 
    6081           0 : static PyObject *py_netr_Authenticator_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6082             : {
    6083           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6084           0 :         PyObject *ret = NULL;
    6085             :         DATA_BLOB blob;
    6086             :         enum ndr_err_code err;
    6087           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6088           0 :         if (tmp_ctx == NULL) {
    6089           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6090           0 :                 return NULL;
    6091             :         }
    6092           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Authenticator);
    6093           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6094           0 :                 TALLOC_FREE(tmp_ctx);
    6095           0 :                 PyErr_SetNdrError(err);
    6096           0 :                 return NULL;
    6097             :         }
    6098             : 
    6099           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6100           0 :         TALLOC_FREE(tmp_ctx);
    6101           0 :         return ret;
    6102             : }
    6103             : 
    6104           0 : static PyObject *py_netr_Authenticator_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6105             : {
    6106           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6107           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6108           0 :         Py_ssize_t blob_length = 0;
    6109             :         enum ndr_err_code err;
    6110           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6111           0 :         PyObject *allow_remaining_obj = NULL;
    6112           0 :         bool allow_remaining = false;
    6113             : 
    6114           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6115             :                 discard_const_p(char *, kwnames),
    6116             :                 &blob.data, &blob_length,
    6117             :                 &allow_remaining_obj)) {
    6118           0 :                 return NULL;
    6119             :         }
    6120           0 :         blob.length = blob_length;
    6121             : 
    6122           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6123           0 :                 allow_remaining = true;
    6124             :         }
    6125             : 
    6126           0 :         if (allow_remaining) {
    6127           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6128             :         } else {
    6129           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6130             :         }
    6131           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6132           0 :                 PyErr_SetNdrError(err);
    6133           0 :                 return NULL;
    6134             :         }
    6135             : 
    6136           0 :         Py_RETURN_NONE;
    6137             : }
    6138             : 
    6139           0 : static PyObject *py_netr_Authenticator_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6140             : {
    6141           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6142             :         PyObject *ret;
    6143             :         char *retstr;
    6144             : 
    6145           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Authenticator, "netr_Authenticator", object);
    6146           0 :         ret = PyUnicode_FromString(retstr);
    6147           0 :         talloc_free(retstr);
    6148             : 
    6149           0 :         return ret;
    6150             : }
    6151             : 
    6152             : static PyMethodDef py_netr_Authenticator_methods[] = {
    6153             :         { "__ndr_pack__", (PyCFunction)py_netr_Authenticator_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6154             :         { "__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" },
    6155             :         { "__ndr_print__", (PyCFunction)py_netr_Authenticator_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6156             :         { NULL, NULL, 0, NULL }
    6157             : };
    6158             : 
    6159             : 
    6160             : static PyTypeObject netr_Authenticator_Type = {
    6161             :         PyVarObject_HEAD_INIT(NULL, 0)
    6162             :         .tp_name = "netlogon.netr_Authenticator",
    6163             :         .tp_getset = py_netr_Authenticator_getsetters,
    6164             :         .tp_methods = py_netr_Authenticator_methods,
    6165             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6166             :         .tp_new = py_netr_Authenticator_new,
    6167             : };
    6168             : 
    6169             : 
    6170           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_account_name(PyObject *obj, void *closure)
    6171             : {
    6172           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6173             :         PyObject *py_account_name;
    6174           0 :         if (object->account_name == NULL) {
    6175           0 :                 Py_RETURN_NONE;
    6176             :         }
    6177           0 :         if (object->account_name == NULL) {
    6178           0 :                 py_account_name = Py_None;
    6179           0 :                 Py_INCREF(py_account_name);
    6180             :         } else {
    6181           0 :                 if (object->account_name == NULL) {
    6182           0 :                         py_account_name = Py_None;
    6183           0 :                         Py_INCREF(py_account_name);
    6184             :                 } else {
    6185           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
    6186             :                 }
    6187             :         }
    6188           0 :         return py_account_name;
    6189             : }
    6190             : 
    6191           0 : static int py_netr_DELTA_DELETE_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    6192             : {
    6193           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6194           0 :         if (value == NULL) {
    6195           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    6196           0 :                 return -1;
    6197             :         }
    6198           0 :         if (value == Py_None) {
    6199           0 :                 object->account_name = NULL;
    6200             :         } else {
    6201           0 :                 object->account_name = NULL;
    6202             :                 {
    6203             :                         const char *test_str;
    6204             :                         const char *talloc_str;
    6205           0 :                         PyObject *unicode = NULL;
    6206           0 :                         if (PyUnicode_Check(value)) {
    6207           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6208           0 :                                 if (unicode == NULL) {
    6209           0 :                                         PyErr_NoMemory();
    6210           0 :                                         return -1;
    6211             :                                 }
    6212           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6213           0 :                         } else if (PyBytes_Check(value)) {
    6214           0 :                                 test_str = PyBytes_AS_STRING(value);
    6215             :                         } else {
    6216           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6217           0 :                                 return -1;
    6218             :                         }
    6219           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6220           0 :                         if (unicode != NULL) {
    6221           0 :                                 Py_DECREF(unicode);
    6222             :                         }
    6223           0 :                         if (talloc_str == NULL) {
    6224           0 :                                 PyErr_NoMemory();
    6225           0 :                                 return -1;
    6226             :                         }
    6227           0 :                         object->account_name = talloc_str;
    6228             :                 }
    6229             :         }
    6230           0 :         return 0;
    6231             : }
    6232             : 
    6233           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown1(PyObject *obj, void *closure)
    6234             : {
    6235           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6236             :         PyObject *py_unknown1;
    6237           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    6238           0 :         return py_unknown1;
    6239             : }
    6240             : 
    6241           0 : static int py_netr_DELTA_DELETE_USER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    6242             : {
    6243           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6244           0 :         if (value == NULL) {
    6245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    6246           0 :                 return -1;
    6247             :         }
    6248           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6249           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6250           0 :                 PyErr_NoMemory();
    6251           0 :                 return -1;
    6252             :         }
    6253           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6254           0 :         return 0;
    6255             : }
    6256             : 
    6257           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown2(PyObject *obj, void *closure)
    6258             : {
    6259           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6260             :         PyObject *py_unknown2;
    6261           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    6262           0 :         return py_unknown2;
    6263             : }
    6264             : 
    6265           0 : static int py_netr_DELTA_DELETE_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    6266             : {
    6267           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6268           0 :         if (value == NULL) {
    6269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    6270           0 :                 return -1;
    6271             :         }
    6272           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6273           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6274           0 :                 PyErr_NoMemory();
    6275           0 :                 return -1;
    6276             :         }
    6277           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6278           0 :         return 0;
    6279             : }
    6280             : 
    6281           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown3(PyObject *obj, void *closure)
    6282             : {
    6283           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6284             :         PyObject *py_unknown3;
    6285           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    6286           0 :         return py_unknown3;
    6287             : }
    6288             : 
    6289           0 : static int py_netr_DELTA_DELETE_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    6290             : {
    6291           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6292           0 :         if (value == NULL) {
    6293           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    6294           0 :                 return -1;
    6295             :         }
    6296           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6297           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6298           0 :                 PyErr_NoMemory();
    6299           0 :                 return -1;
    6300             :         }
    6301           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6302           0 :         return 0;
    6303             : }
    6304             : 
    6305           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown4(PyObject *obj, void *closure)
    6306             : {
    6307           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6308             :         PyObject *py_unknown4;
    6309           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    6310           0 :         return py_unknown4;
    6311             : }
    6312             : 
    6313           0 : static int py_netr_DELTA_DELETE_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    6314             : {
    6315           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6316           0 :         if (value == NULL) {
    6317           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    6318           0 :                 return -1;
    6319             :         }
    6320           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6321           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6322           0 :                 PyErr_NoMemory();
    6323           0 :                 return -1;
    6324             :         }
    6325           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6326           0 :         return 0;
    6327             : }
    6328             : 
    6329           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown5(PyObject *obj, void *closure)
    6330             : {
    6331           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6332             :         PyObject *py_unknown5;
    6333           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
    6334           0 :         return py_unknown5;
    6335             : }
    6336             : 
    6337           0 : static int py_netr_DELTA_DELETE_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    6338             : {
    6339           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6340           0 :         if (value == NULL) {
    6341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
    6342           0 :                 return -1;
    6343             :         }
    6344             :         {
    6345           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    6346           0 :                 if (PyLong_Check(value)) {
    6347             :                         unsigned long long test_var;
    6348           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6349           0 :                         if (PyErr_Occurred() != NULL) {
    6350           0 :                                 return -1;
    6351             :                         }
    6352           0 :                         if (test_var > uint_max) {
    6353           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6354             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6355           0 :                                 return -1;
    6356             :                         }
    6357           0 :                         object->unknown5 = test_var;
    6358             :                 } else {
    6359           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6360             :                           PyLong_Type.tp_name);
    6361           0 :                         return -1;
    6362             :                 }
    6363             :         }
    6364           0 :         return 0;
    6365             : }
    6366             : 
    6367           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown6(PyObject *obj, void *closure)
    6368             : {
    6369           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6370             :         PyObject *py_unknown6;
    6371           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    6372           0 :         return py_unknown6;
    6373             : }
    6374             : 
    6375           0 : static int py_netr_DELTA_DELETE_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    6376             : {
    6377           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6378           0 :         if (value == NULL) {
    6379           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    6380           0 :                 return -1;
    6381             :         }
    6382             :         {
    6383           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    6384           0 :                 if (PyLong_Check(value)) {
    6385             :                         unsigned long long test_var;
    6386           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6387           0 :                         if (PyErr_Occurred() != NULL) {
    6388           0 :                                 return -1;
    6389             :                         }
    6390           0 :                         if (test_var > uint_max) {
    6391           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6392             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6393           0 :                                 return -1;
    6394             :                         }
    6395           0 :                         object->unknown6 = test_var;
    6396             :                 } else {
    6397           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6398             :                           PyLong_Type.tp_name);
    6399           0 :                         return -1;
    6400             :                 }
    6401             :         }
    6402           0 :         return 0;
    6403             : }
    6404             : 
    6405           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown7(PyObject *obj, void *closure)
    6406             : {
    6407           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6408             :         PyObject *py_unknown7;
    6409           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    6410           0 :         return py_unknown7;
    6411             : }
    6412             : 
    6413           0 : static int py_netr_DELTA_DELETE_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    6414             : {
    6415           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6416           0 :         if (value == NULL) {
    6417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    6418           0 :                 return -1;
    6419             :         }
    6420             :         {
    6421           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    6422           0 :                 if (PyLong_Check(value)) {
    6423             :                         unsigned long long test_var;
    6424           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6425           0 :                         if (PyErr_Occurred() != NULL) {
    6426           0 :                                 return -1;
    6427             :                         }
    6428           0 :                         if (test_var > uint_max) {
    6429           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6430             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6431           0 :                                 return -1;
    6432             :                         }
    6433           0 :                         object->unknown7 = test_var;
    6434             :                 } else {
    6435           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6436             :                           PyLong_Type.tp_name);
    6437           0 :                         return -1;
    6438             :                 }
    6439             :         }
    6440           0 :         return 0;
    6441             : }
    6442             : 
    6443           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown8(PyObject *obj, void *closure)
    6444             : {
    6445           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6446             :         PyObject *py_unknown8;
    6447           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    6448           0 :         return py_unknown8;
    6449             : }
    6450             : 
    6451           0 : static int py_netr_DELTA_DELETE_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    6452             : {
    6453           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6454           0 :         if (value == NULL) {
    6455           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    6456           0 :                 return -1;
    6457             :         }
    6458             :         {
    6459           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    6460           0 :                 if (PyLong_Check(value)) {
    6461             :                         unsigned long long test_var;
    6462           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6463           0 :                         if (PyErr_Occurred() != NULL) {
    6464           0 :                                 return -1;
    6465             :                         }
    6466           0 :                         if (test_var > uint_max) {
    6467           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6468             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6469           0 :                                 return -1;
    6470             :                         }
    6471           0 :                         object->unknown8 = test_var;
    6472             :                 } else {
    6473           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6474             :                           PyLong_Type.tp_name);
    6475           0 :                         return -1;
    6476             :                 }
    6477             :         }
    6478           0 :         return 0;
    6479             : }
    6480             : 
    6481             : static PyGetSetDef py_netr_DELTA_DELETE_USER_getsetters[] = {
    6482             :         {
    6483             :                 .name = discard_const_p(char, "account_name"),
    6484             :                 .get = py_netr_DELTA_DELETE_USER_get_account_name,
    6485             :                 .set = py_netr_DELTA_DELETE_USER_set_account_name,
    6486             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6487             :         },
    6488             :         {
    6489             :                 .name = discard_const_p(char, "unknown1"),
    6490             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown1,
    6491             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown1,
    6492             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6493             :         },
    6494             :         {
    6495             :                 .name = discard_const_p(char, "unknown2"),
    6496             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown2,
    6497             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown2,
    6498             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6499             :         },
    6500             :         {
    6501             :                 .name = discard_const_p(char, "unknown3"),
    6502             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown3,
    6503             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown3,
    6504             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6505             :         },
    6506             :         {
    6507             :                 .name = discard_const_p(char, "unknown4"),
    6508             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown4,
    6509             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown4,
    6510             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6511             :         },
    6512             :         {
    6513             :                 .name = discard_const_p(char, "unknown5"),
    6514             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown5,
    6515             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown5,
    6516             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6517             :         },
    6518             :         {
    6519             :                 .name = discard_const_p(char, "unknown6"),
    6520             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown6,
    6521             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown6,
    6522             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6523             :         },
    6524             :         {
    6525             :                 .name = discard_const_p(char, "unknown7"),
    6526             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown7,
    6527             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown7,
    6528             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6529             :         },
    6530             :         {
    6531             :                 .name = discard_const_p(char, "unknown8"),
    6532             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown8,
    6533             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown8,
    6534             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6535             :         },
    6536             :         { .name = NULL }
    6537             : };
    6538             : 
    6539           0 : static PyObject *py_netr_DELTA_DELETE_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6540             : {
    6541           0 :         return pytalloc_new(struct netr_DELTA_DELETE_USER, type);
    6542             : }
    6543             : 
    6544             : 
    6545             : static PyTypeObject netr_DELTA_DELETE_USER_Type = {
    6546             :         PyVarObject_HEAD_INIT(NULL, 0)
    6547             :         .tp_name = "netlogon.netr_DELTA_DELETE_USER",
    6548             :         .tp_getset = py_netr_DELTA_DELETE_USER_getsetters,
    6549             :         .tp_methods = NULL,
    6550             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6551             :         .tp_new = py_netr_DELTA_DELETE_USER_new,
    6552             : };
    6553             : 
    6554             : 
    6555           0 : static PyObject *py_netr_USER_KEY16_get_length(PyObject *obj, void *closure)
    6556             : {
    6557           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6558             :         PyObject *py_length;
    6559           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
    6560           0 :         return py_length;
    6561             : }
    6562             : 
    6563           0 : static int py_netr_USER_KEY16_set_length(PyObject *py_obj, PyObject *value, void *closure)
    6564             : {
    6565           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6566           0 :         if (value == NULL) {
    6567           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    6568           0 :                 return -1;
    6569             :         }
    6570             :         {
    6571           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    6572           0 :                 if (PyLong_Check(value)) {
    6573             :                         unsigned long long test_var;
    6574           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6575           0 :                         if (PyErr_Occurred() != NULL) {
    6576           0 :                                 return -1;
    6577             :                         }
    6578           0 :                         if (test_var > uint_max) {
    6579           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6580             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6581           0 :                                 return -1;
    6582             :                         }
    6583           0 :                         object->length = test_var;
    6584             :                 } else {
    6585           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6586             :                           PyLong_Type.tp_name);
    6587           0 :                         return -1;
    6588             :                 }
    6589             :         }
    6590           0 :         return 0;
    6591             : }
    6592             : 
    6593           0 : static PyObject *py_netr_USER_KEY16_get_size(PyObject *obj, void *closure)
    6594             : {
    6595           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6596             :         PyObject *py_size;
    6597           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
    6598           0 :         return py_size;
    6599             : }
    6600             : 
    6601           0 : static int py_netr_USER_KEY16_set_size(PyObject *py_obj, PyObject *value, void *closure)
    6602             : {
    6603           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6604           0 :         if (value == NULL) {
    6605           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    6606           0 :                 return -1;
    6607             :         }
    6608             :         {
    6609           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    6610           0 :                 if (PyLong_Check(value)) {
    6611             :                         unsigned long long test_var;
    6612           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6613           0 :                         if (PyErr_Occurred() != NULL) {
    6614           0 :                                 return -1;
    6615             :                         }
    6616           0 :                         if (test_var > uint_max) {
    6617           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6618             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6619           0 :                                 return -1;
    6620             :                         }
    6621           0 :                         object->size = test_var;
    6622             :                 } else {
    6623           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6624             :                           PyLong_Type.tp_name);
    6625           0 :                         return -1;
    6626             :                 }
    6627             :         }
    6628           0 :         return 0;
    6629             : }
    6630             : 
    6631           0 : static PyObject *py_netr_USER_KEY16_get_flags(PyObject *obj, void *closure)
    6632             : {
    6633           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6634             :         PyObject *py_flags;
    6635           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
    6636           0 :         return py_flags;
    6637             : }
    6638             : 
    6639           0 : static int py_netr_USER_KEY16_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    6640             : {
    6641           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6642           0 :         if (value == NULL) {
    6643           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    6644           0 :                 return -1;
    6645             :         }
    6646             :         {
    6647           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    6648           0 :                 if (PyLong_Check(value)) {
    6649             :                         unsigned long long test_var;
    6650           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6651           0 :                         if (PyErr_Occurred() != NULL) {
    6652           0 :                                 return -1;
    6653             :                         }
    6654           0 :                         if (test_var > uint_max) {
    6655           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6656             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6657           0 :                                 return -1;
    6658             :                         }
    6659           0 :                         object->flags = test_var;
    6660             :                 } else {
    6661           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6662             :                           PyLong_Type.tp_name);
    6663           0 :                         return -1;
    6664             :                 }
    6665             :         }
    6666           0 :         return 0;
    6667             : }
    6668             : 
    6669           0 : static PyObject *py_netr_USER_KEY16_get_pwd(PyObject *obj, void *closure)
    6670             : {
    6671           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6672             :         PyObject *py_pwd;
    6673           0 :         py_pwd = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->pwd);
    6674           0 :         return py_pwd;
    6675             : }
    6676             : 
    6677           0 : static int py_netr_USER_KEY16_set_pwd(PyObject *py_obj, PyObject *value, void *closure)
    6678             : {
    6679           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6680           0 :         if (value == NULL) {
    6681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwd");
    6682           0 :                 return -1;
    6683             :         }
    6684           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    6685           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6686           0 :                 PyErr_NoMemory();
    6687           0 :                 return -1;
    6688             :         }
    6689           0 :         object->pwd = *(struct samr_Password *)pytalloc_get_ptr(value);
    6690           0 :         return 0;
    6691             : }
    6692             : 
    6693             : static PyGetSetDef py_netr_USER_KEY16_getsetters[] = {
    6694             :         {
    6695             :                 .name = discard_const_p(char, "length"),
    6696             :                 .get = py_netr_USER_KEY16_get_length,
    6697             :                 .set = py_netr_USER_KEY16_set_length,
    6698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6699             :         },
    6700             :         {
    6701             :                 .name = discard_const_p(char, "size"),
    6702             :                 .get = py_netr_USER_KEY16_get_size,
    6703             :                 .set = py_netr_USER_KEY16_set_size,
    6704             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6705             :         },
    6706             :         {
    6707             :                 .name = discard_const_p(char, "flags"),
    6708             :                 .get = py_netr_USER_KEY16_get_flags,
    6709             :                 .set = py_netr_USER_KEY16_set_flags,
    6710             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6711             :         },
    6712             :         {
    6713             :                 .name = discard_const_p(char, "pwd"),
    6714             :                 .get = py_netr_USER_KEY16_get_pwd,
    6715             :                 .set = py_netr_USER_KEY16_set_pwd,
    6716             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    6717             :         },
    6718             :         { .name = NULL }
    6719             : };
    6720             : 
    6721           0 : static PyObject *py_netr_USER_KEY16_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6722             : {
    6723           0 :         return pytalloc_new(struct netr_USER_KEY16, type);
    6724             : }
    6725             : 
    6726             : 
    6727             : static PyTypeObject netr_USER_KEY16_Type = {
    6728             :         PyVarObject_HEAD_INIT(NULL, 0)
    6729             :         .tp_name = "netlogon.netr_USER_KEY16",
    6730             :         .tp_getset = py_netr_USER_KEY16_getsetters,
    6731             :         .tp_methods = NULL,
    6732             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6733             :         .tp_new = py_netr_USER_KEY16_new,
    6734             : };
    6735             : 
    6736             : 
    6737           0 : static PyObject *py_netr_PasswordHistory_get_nt_length(PyObject *obj, void *closure)
    6738             : {
    6739           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6740             :         PyObject *py_nt_length;
    6741           0 :         py_nt_length = PyLong_FromLong((uint16_t)object->nt_length);
    6742           0 :         return py_nt_length;
    6743             : }
    6744             : 
    6745           0 : static int py_netr_PasswordHistory_set_nt_length(PyObject *py_obj, PyObject *value, void *closure)
    6746             : {
    6747           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6748           0 :         if (value == NULL) {
    6749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_length");
    6750           0 :                 return -1;
    6751             :         }
    6752             :         {
    6753           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_length));
    6754           0 :                 if (PyLong_Check(value)) {
    6755             :                         unsigned long long test_var;
    6756           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6757           0 :                         if (PyErr_Occurred() != NULL) {
    6758           0 :                                 return -1;
    6759             :                         }
    6760           0 :                         if (test_var > uint_max) {
    6761           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6762             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6763           0 :                                 return -1;
    6764             :                         }
    6765           0 :                         object->nt_length = test_var;
    6766             :                 } else {
    6767           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6768             :                           PyLong_Type.tp_name);
    6769           0 :                         return -1;
    6770             :                 }
    6771             :         }
    6772           0 :         return 0;
    6773             : }
    6774             : 
    6775           0 : static PyObject *py_netr_PasswordHistory_get_nt_size(PyObject *obj, void *closure)
    6776             : {
    6777           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6778             :         PyObject *py_nt_size;
    6779           0 :         py_nt_size = PyLong_FromLong((uint16_t)object->nt_size);
    6780           0 :         return py_nt_size;
    6781             : }
    6782             : 
    6783           0 : static int py_netr_PasswordHistory_set_nt_size(PyObject *py_obj, PyObject *value, void *closure)
    6784             : {
    6785           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6786           0 :         if (value == NULL) {
    6787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_size");
    6788           0 :                 return -1;
    6789             :         }
    6790             :         {
    6791           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_size));
    6792           0 :                 if (PyLong_Check(value)) {
    6793             :                         unsigned long long test_var;
    6794           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6795           0 :                         if (PyErr_Occurred() != NULL) {
    6796           0 :                                 return -1;
    6797             :                         }
    6798           0 :                         if (test_var > uint_max) {
    6799           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6800             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6801           0 :                                 return -1;
    6802             :                         }
    6803           0 :                         object->nt_size = test_var;
    6804             :                 } else {
    6805           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6806             :                           PyLong_Type.tp_name);
    6807           0 :                         return -1;
    6808             :                 }
    6809             :         }
    6810           0 :         return 0;
    6811             : }
    6812             : 
    6813           0 : static PyObject *py_netr_PasswordHistory_get_nt_flags(PyObject *obj, void *closure)
    6814             : {
    6815           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6816             :         PyObject *py_nt_flags;
    6817           0 :         py_nt_flags = PyLong_FromUnsignedLongLong((uint32_t)object->nt_flags);
    6818           0 :         return py_nt_flags;
    6819             : }
    6820             : 
    6821           0 : static int py_netr_PasswordHistory_set_nt_flags(PyObject *py_obj, PyObject *value, void *closure)
    6822             : {
    6823           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6824           0 :         if (value == NULL) {
    6825           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_flags");
    6826           0 :                 return -1;
    6827             :         }
    6828             :         {
    6829           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_flags));
    6830           0 :                 if (PyLong_Check(value)) {
    6831             :                         unsigned long long test_var;
    6832           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6833           0 :                         if (PyErr_Occurred() != NULL) {
    6834           0 :                                 return -1;
    6835             :                         }
    6836           0 :                         if (test_var > uint_max) {
    6837           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6838             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6839           0 :                                 return -1;
    6840             :                         }
    6841           0 :                         object->nt_flags = test_var;
    6842             :                 } else {
    6843           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6844             :                           PyLong_Type.tp_name);
    6845           0 :                         return -1;
    6846             :                 }
    6847             :         }
    6848           0 :         return 0;
    6849             : }
    6850             : 
    6851           0 : static PyObject *py_netr_PasswordHistory_get_lm_length(PyObject *obj, void *closure)
    6852             : {
    6853           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6854             :         PyObject *py_lm_length;
    6855           0 :         py_lm_length = PyLong_FromLong((uint16_t)object->lm_length);
    6856           0 :         return py_lm_length;
    6857             : }
    6858             : 
    6859           0 : static int py_netr_PasswordHistory_set_lm_length(PyObject *py_obj, PyObject *value, void *closure)
    6860             : {
    6861           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6862           0 :         if (value == NULL) {
    6863           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_length");
    6864           0 :                 return -1;
    6865             :         }
    6866             :         {
    6867           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_length));
    6868           0 :                 if (PyLong_Check(value)) {
    6869             :                         unsigned long long test_var;
    6870           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6871           0 :                         if (PyErr_Occurred() != NULL) {
    6872           0 :                                 return -1;
    6873             :                         }
    6874           0 :                         if (test_var > uint_max) {
    6875           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6876             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6877           0 :                                 return -1;
    6878             :                         }
    6879           0 :                         object->lm_length = test_var;
    6880             :                 } else {
    6881           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6882             :                           PyLong_Type.tp_name);
    6883           0 :                         return -1;
    6884             :                 }
    6885             :         }
    6886           0 :         return 0;
    6887             : }
    6888             : 
    6889           0 : static PyObject *py_netr_PasswordHistory_get_lm_size(PyObject *obj, void *closure)
    6890             : {
    6891           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6892             :         PyObject *py_lm_size;
    6893           0 :         py_lm_size = PyLong_FromLong((uint16_t)object->lm_size);
    6894           0 :         return py_lm_size;
    6895             : }
    6896             : 
    6897           0 : static int py_netr_PasswordHistory_set_lm_size(PyObject *py_obj, PyObject *value, void *closure)
    6898             : {
    6899           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6900           0 :         if (value == NULL) {
    6901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_size");
    6902           0 :                 return -1;
    6903             :         }
    6904             :         {
    6905           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_size));
    6906           0 :                 if (PyLong_Check(value)) {
    6907             :                         unsigned long long test_var;
    6908           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6909           0 :                         if (PyErr_Occurred() != NULL) {
    6910           0 :                                 return -1;
    6911             :                         }
    6912           0 :                         if (test_var > uint_max) {
    6913           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6914             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6915           0 :                                 return -1;
    6916             :                         }
    6917           0 :                         object->lm_size = test_var;
    6918             :                 } else {
    6919           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6920             :                           PyLong_Type.tp_name);
    6921           0 :                         return -1;
    6922             :                 }
    6923             :         }
    6924           0 :         return 0;
    6925             : }
    6926             : 
    6927           0 : static PyObject *py_netr_PasswordHistory_get_lm_flags(PyObject *obj, void *closure)
    6928             : {
    6929           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6930             :         PyObject *py_lm_flags;
    6931           0 :         py_lm_flags = PyLong_FromUnsignedLongLong((uint32_t)object->lm_flags);
    6932           0 :         return py_lm_flags;
    6933             : }
    6934             : 
    6935           0 : static int py_netr_PasswordHistory_set_lm_flags(PyObject *py_obj, PyObject *value, void *closure)
    6936             : {
    6937           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6938           0 :         if (value == NULL) {
    6939           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_flags");
    6940           0 :                 return -1;
    6941             :         }
    6942             :         {
    6943           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_flags));
    6944           0 :                 if (PyLong_Check(value)) {
    6945             :                         unsigned long long test_var;
    6946           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6947           0 :                         if (PyErr_Occurred() != NULL) {
    6948           0 :                                 return -1;
    6949             :                         }
    6950           0 :                         if (test_var > uint_max) {
    6951           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6952             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6953           0 :                                 return -1;
    6954             :                         }
    6955           0 :                         object->lm_flags = test_var;
    6956             :                 } else {
    6957           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6958             :                           PyLong_Type.tp_name);
    6959           0 :                         return -1;
    6960             :                 }
    6961             :         }
    6962           0 :         return 0;
    6963             : }
    6964             : 
    6965           0 : static PyObject *py_netr_PasswordHistory_get_nt_history(PyObject *obj, void *closure)
    6966             : {
    6967           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6968             :         PyObject *py_nt_history;
    6969           0 :         py_nt_history = PyList_New(object->nt_length);
    6970           0 :         if (py_nt_history == NULL) {
    6971           0 :                 return NULL;
    6972             :         }
    6973             :         {
    6974             :                 int nt_history_cntr_0;
    6975           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < (object->nt_length); nt_history_cntr_0++) {
    6976             :                         PyObject *py_nt_history_0;
    6977           0 :                         py_nt_history_0 = PyLong_FromLong((uint16_t)object->nt_history[nt_history_cntr_0]);
    6978           0 :                         PyList_SetItem(py_nt_history, nt_history_cntr_0, py_nt_history_0);
    6979             :                 }
    6980             :         }
    6981           0 :         return py_nt_history;
    6982             : }
    6983             : 
    6984           0 : static int py_netr_PasswordHistory_set_nt_history(PyObject *py_obj, PyObject *value, void *closure)
    6985             : {
    6986           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6987           0 :         if (value == NULL) {
    6988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_history");
    6989           0 :                 return -1;
    6990             :         }
    6991           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    6992             :         {
    6993             :                 int nt_history_cntr_0;
    6994           0 :                 object->nt_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->nt_history, PyList_GET_SIZE(value));
    6995           0 :                 if (!object->nt_history) { return -1;; }
    6996           0 :                 talloc_set_name_const(object->nt_history, "ARRAY: object->nt_history");
    6997           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < PyList_GET_SIZE(value); nt_history_cntr_0++) {
    6998           0 :                         if (PyList_GET_ITEM(value, nt_history_cntr_0) == NULL) {
    6999           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_history[nt_history_cntr_0]");
    7000           0 :                                 return -1;
    7001             :                         }
    7002             :                         {
    7003           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_history[nt_history_cntr_0]));
    7004           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, nt_history_cntr_0))) {
    7005             :                                         unsigned long long test_var;
    7006           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, nt_history_cntr_0));
    7007           0 :                                         if (PyErr_Occurred() != NULL) {
    7008           0 :                                                 return -1;
    7009             :                                         }
    7010           0 :                                         if (test_var > uint_max) {
    7011           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7012             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7013           0 :                                                 return -1;
    7014             :                                         }
    7015           0 :                                         object->nt_history[nt_history_cntr_0] = test_var;
    7016             :                                 } else {
    7017           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7018             :                                           PyLong_Type.tp_name);
    7019           0 :                                         return -1;
    7020             :                                 }
    7021             :                         }
    7022             :                 }
    7023             :         }
    7024           0 :         return 0;
    7025             : }
    7026             : 
    7027           0 : static PyObject *py_netr_PasswordHistory_get_lm_history(PyObject *obj, void *closure)
    7028             : {
    7029           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    7030             :         PyObject *py_lm_history;
    7031           0 :         py_lm_history = PyList_New(object->lm_length);
    7032           0 :         if (py_lm_history == NULL) {
    7033           0 :                 return NULL;
    7034             :         }
    7035             :         {
    7036             :                 int lm_history_cntr_0;
    7037           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < (object->lm_length); lm_history_cntr_0++) {
    7038             :                         PyObject *py_lm_history_0;
    7039           0 :                         py_lm_history_0 = PyLong_FromLong((uint16_t)object->lm_history[lm_history_cntr_0]);
    7040           0 :                         PyList_SetItem(py_lm_history, lm_history_cntr_0, py_lm_history_0);
    7041             :                 }
    7042             :         }
    7043           0 :         return py_lm_history;
    7044             : }
    7045             : 
    7046           0 : static int py_netr_PasswordHistory_set_lm_history(PyObject *py_obj, PyObject *value, void *closure)
    7047             : {
    7048           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    7049           0 :         if (value == NULL) {
    7050           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_history");
    7051           0 :                 return -1;
    7052             :         }
    7053           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7054             :         {
    7055             :                 int lm_history_cntr_0;
    7056           0 :                 object->lm_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->lm_history, PyList_GET_SIZE(value));
    7057           0 :                 if (!object->lm_history) { return -1;; }
    7058           0 :                 talloc_set_name_const(object->lm_history, "ARRAY: object->lm_history");
    7059           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < PyList_GET_SIZE(value); lm_history_cntr_0++) {
    7060           0 :                         if (PyList_GET_ITEM(value, lm_history_cntr_0) == NULL) {
    7061           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_history[lm_history_cntr_0]");
    7062           0 :                                 return -1;
    7063             :                         }
    7064             :                         {
    7065           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_history[lm_history_cntr_0]));
    7066           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, lm_history_cntr_0))) {
    7067             :                                         unsigned long long test_var;
    7068           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, lm_history_cntr_0));
    7069           0 :                                         if (PyErr_Occurred() != NULL) {
    7070           0 :                                                 return -1;
    7071             :                                         }
    7072           0 :                                         if (test_var > uint_max) {
    7073           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7074             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7075           0 :                                                 return -1;
    7076             :                                         }
    7077           0 :                                         object->lm_history[lm_history_cntr_0] = test_var;
    7078             :                                 } else {
    7079           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7080             :                                           PyLong_Type.tp_name);
    7081           0 :                                         return -1;
    7082             :                                 }
    7083             :                         }
    7084             :                 }
    7085             :         }
    7086           0 :         return 0;
    7087             : }
    7088             : 
    7089             : static PyGetSetDef py_netr_PasswordHistory_getsetters[] = {
    7090             :         {
    7091             :                 .name = discard_const_p(char, "nt_length"),
    7092             :                 .get = py_netr_PasswordHistory_get_nt_length,
    7093             :                 .set = py_netr_PasswordHistory_set_nt_length,
    7094             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7095             :         },
    7096             :         {
    7097             :                 .name = discard_const_p(char, "nt_size"),
    7098             :                 .get = py_netr_PasswordHistory_get_nt_size,
    7099             :                 .set = py_netr_PasswordHistory_set_nt_size,
    7100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7101             :         },
    7102             :         {
    7103             :                 .name = discard_const_p(char, "nt_flags"),
    7104             :                 .get = py_netr_PasswordHistory_get_nt_flags,
    7105             :                 .set = py_netr_PasswordHistory_set_nt_flags,
    7106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7107             :         },
    7108             :         {
    7109             :                 .name = discard_const_p(char, "lm_length"),
    7110             :                 .get = py_netr_PasswordHistory_get_lm_length,
    7111             :                 .set = py_netr_PasswordHistory_set_lm_length,
    7112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7113             :         },
    7114             :         {
    7115             :                 .name = discard_const_p(char, "lm_size"),
    7116             :                 .get = py_netr_PasswordHistory_get_lm_size,
    7117             :                 .set = py_netr_PasswordHistory_set_lm_size,
    7118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7119             :         },
    7120             :         {
    7121             :                 .name = discard_const_p(char, "lm_flags"),
    7122             :                 .get = py_netr_PasswordHistory_get_lm_flags,
    7123             :                 .set = py_netr_PasswordHistory_set_lm_flags,
    7124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7125             :         },
    7126             :         {
    7127             :                 .name = discard_const_p(char, "nt_history"),
    7128             :                 .get = py_netr_PasswordHistory_get_nt_history,
    7129             :                 .set = py_netr_PasswordHistory_set_nt_history,
    7130             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7131             :         },
    7132             :         {
    7133             :                 .name = discard_const_p(char, "lm_history"),
    7134             :                 .get = py_netr_PasswordHistory_get_lm_history,
    7135             :                 .set = py_netr_PasswordHistory_set_lm_history,
    7136             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7137             :         },
    7138             :         { .name = NULL }
    7139             : };
    7140             : 
    7141           0 : static PyObject *py_netr_PasswordHistory_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7142             : {
    7143           0 :         return pytalloc_new(struct netr_PasswordHistory, type);
    7144             : }
    7145             : 
    7146             : 
    7147             : static PyTypeObject netr_PasswordHistory_Type = {
    7148             :         PyVarObject_HEAD_INIT(NULL, 0)
    7149             :         .tp_name = "netlogon.netr_PasswordHistory",
    7150             :         .tp_getset = py_netr_PasswordHistory_getsetters,
    7151             :         .tp_methods = NULL,
    7152             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7153             :         .tp_new = py_netr_PasswordHistory_new,
    7154             : };
    7155             : 
    7156             : 
    7157           0 : static PyObject *py_netr_USER_KEYS2_get_lmpassword(PyObject *obj, void *closure)
    7158             : {
    7159           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7160             :         PyObject *py_lmpassword;
    7161           0 :         py_lmpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    7162           0 :         return py_lmpassword;
    7163             : }
    7164             : 
    7165           0 : static int py_netr_USER_KEYS2_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    7166             : {
    7167           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7168           0 :         if (value == NULL) {
    7169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    7170           0 :                 return -1;
    7171             :         }
    7172           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7173           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7174           0 :                 PyErr_NoMemory();
    7175           0 :                 return -1;
    7176             :         }
    7177           0 :         object->lmpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7178           0 :         return 0;
    7179             : }
    7180             : 
    7181           0 : static PyObject *py_netr_USER_KEYS2_get_ntpassword(PyObject *obj, void *closure)
    7182             : {
    7183           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7184             :         PyObject *py_ntpassword;
    7185           0 :         py_ntpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    7186           0 :         return py_ntpassword;
    7187             : }
    7188             : 
    7189           0 : static int py_netr_USER_KEYS2_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    7190             : {
    7191           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7192           0 :         if (value == NULL) {
    7193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    7194           0 :                 return -1;
    7195             :         }
    7196           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7197           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7198           0 :                 PyErr_NoMemory();
    7199           0 :                 return -1;
    7200             :         }
    7201           0 :         object->ntpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7202           0 :         return 0;
    7203             : }
    7204             : 
    7205           0 : static PyObject *py_netr_USER_KEYS2_get_history(PyObject *obj, void *closure)
    7206             : {
    7207           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7208             :         PyObject *py_history;
    7209           0 :         py_history = pytalloc_reference_ex(&netr_PasswordHistory_Type, pytalloc_get_mem_ctx(obj), &object->history);
    7210           0 :         return py_history;
    7211             : }
    7212             : 
    7213           0 : static int py_netr_USER_KEYS2_set_history(PyObject *py_obj, PyObject *value, void *closure)
    7214             : {
    7215           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7216           0 :         if (value == NULL) {
    7217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->history");
    7218           0 :                 return -1;
    7219             :         }
    7220           0 :         PY_CHECK_TYPE(&netr_PasswordHistory_Type, value, return -1;);
    7221           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7222           0 :                 PyErr_NoMemory();
    7223           0 :                 return -1;
    7224             :         }
    7225           0 :         object->history = *(struct netr_PasswordHistory *)pytalloc_get_ptr(value);
    7226           0 :         return 0;
    7227             : }
    7228             : 
    7229             : static PyGetSetDef py_netr_USER_KEYS2_getsetters[] = {
    7230             :         {
    7231             :                 .name = discard_const_p(char, "lmpassword"),
    7232             :                 .get = py_netr_USER_KEYS2_get_lmpassword,
    7233             :                 .set = py_netr_USER_KEYS2_set_lmpassword,
    7234             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7235             :         },
    7236             :         {
    7237             :                 .name = discard_const_p(char, "ntpassword"),
    7238             :                 .get = py_netr_USER_KEYS2_get_ntpassword,
    7239             :                 .set = py_netr_USER_KEYS2_set_ntpassword,
    7240             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7241             :         },
    7242             :         {
    7243             :                 .name = discard_const_p(char, "history"),
    7244             :                 .get = py_netr_USER_KEYS2_get_history,
    7245             :                 .set = py_netr_USER_KEYS2_set_history,
    7246             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_PasswordHistory")
    7247             :         },
    7248             :         { .name = NULL }
    7249             : };
    7250             : 
    7251           0 : static PyObject *py_netr_USER_KEYS2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7252             : {
    7253           0 :         return pytalloc_new(struct netr_USER_KEYS2, type);
    7254             : }
    7255             : 
    7256             : 
    7257             : static PyTypeObject netr_USER_KEYS2_Type = {
    7258             :         PyVarObject_HEAD_INIT(NULL, 0)
    7259             :         .tp_name = "netlogon.netr_USER_KEYS2",
    7260             :         .tp_getset = py_netr_USER_KEYS2_getsetters,
    7261             :         .tp_methods = NULL,
    7262             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7263             :         .tp_new = py_netr_USER_KEYS2_new,
    7264             : };
    7265             : 
    7266             : 
    7267           0 : static PyObject *py_netr_USER_KEY_UNION_get_keys2(PyObject *obj, void *closure)
    7268             : {
    7269           0 :         struct netr_USER_KEY_UNION *object = (struct netr_USER_KEY_UNION *)pytalloc_get_ptr(obj);
    7270             :         PyObject *py_keys2;
    7271           0 :         py_keys2 = pytalloc_reference_ex(&netr_USER_KEYS2_Type, pytalloc_get_mem_ctx(obj), &object->keys2);
    7272           0 :         return py_keys2;
    7273             : }
    7274             : 
    7275           0 : static int py_netr_USER_KEY_UNION_set_keys2(PyObject *py_obj, PyObject *value, void *closure)
    7276             : {
    7277           0 :         struct netr_USER_KEY_UNION *object = (struct netr_USER_KEY_UNION *)pytalloc_get_ptr(py_obj);
    7278           0 :         if (value == NULL) {
    7279           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys2");
    7280           0 :                 return -1;
    7281             :         }
    7282           0 :         PY_CHECK_TYPE(&netr_USER_KEYS2_Type, value, return -1;);
    7283           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7284           0 :                 PyErr_NoMemory();
    7285           0 :                 return -1;
    7286             :         }
    7287           0 :         object->keys2 = *(struct netr_USER_KEYS2 *)pytalloc_get_ptr(value);
    7288           0 :         return 0;
    7289             : }
    7290             : 
    7291             : static PyGetSetDef py_netr_USER_KEY_UNION_getsetters[] = {
    7292             :         {
    7293             :                 .name = discard_const_p(char, "keys2"),
    7294             :                 .get = py_netr_USER_KEY_UNION_get_keys2,
    7295             :                 .set = py_netr_USER_KEY_UNION_set_keys2,
    7296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEYS2")
    7297             :         },
    7298             :         { .name = NULL }
    7299             : };
    7300             : 
    7301           0 : static PyObject *py_netr_USER_KEY_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7302             : {
    7303           0 :         return pytalloc_new(struct netr_USER_KEY_UNION, type);
    7304             : }
    7305             : 
    7306             : 
    7307             : static PyTypeObject netr_USER_KEY_UNION_Type = {
    7308             :         PyVarObject_HEAD_INIT(NULL, 0)
    7309             :         .tp_name = "netlogon.netr_USER_KEY_UNION",
    7310             :         .tp_getset = py_netr_USER_KEY_UNION_getsetters,
    7311             :         .tp_methods = NULL,
    7312             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7313             :         .tp_new = py_netr_USER_KEY_UNION_new,
    7314             : };
    7315             : 
    7316             : 
    7317           0 : static PyObject *py_netr_USER_KEYS_get_version(PyObject *obj, void *closure)
    7318             : {
    7319           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(obj);
    7320             :         PyObject *py_version;
    7321           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
    7322           0 :         return py_version;
    7323             : }
    7324             : 
    7325           0 : static int py_netr_USER_KEYS_set_version(PyObject *py_obj, PyObject *value, void *closure)
    7326             : {
    7327           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7328           0 :         if (value == NULL) {
    7329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    7330           0 :                 return -1;
    7331             :         }
    7332             :         {
    7333           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    7334           0 :                 if (PyLong_Check(value)) {
    7335             :                         unsigned long long test_var;
    7336           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7337           0 :                         if (PyErr_Occurred() != NULL) {
    7338           0 :                                 return -1;
    7339             :                         }
    7340           0 :                         if (test_var > uint_max) {
    7341           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7342             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7343           0 :                                 return -1;
    7344             :                         }
    7345           0 :                         object->version = test_var;
    7346             :                 } else {
    7347           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7348             :                           PyLong_Type.tp_name);
    7349           0 :                         return -1;
    7350             :                 }
    7351             :         }
    7352           0 :         return 0;
    7353             : }
    7354             : 
    7355           0 : static PyObject *py_netr_USER_KEYS_get_keys(PyObject *obj, void *closure)
    7356             : {
    7357           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(obj);
    7358             :         PyObject *py_keys;
    7359           0 :         py_keys = pytalloc_reference_ex(&netr_USER_KEY_UNION_Type, pytalloc_get_mem_ctx(obj), &object->keys);
    7360           0 :         return py_keys;
    7361             : }
    7362             : 
    7363           0 : static int py_netr_USER_KEYS_set_keys(PyObject *py_obj, PyObject *value, void *closure)
    7364             : {
    7365           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7366           0 :         if (value == NULL) {
    7367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys");
    7368           0 :                 return -1;
    7369             :         }
    7370           0 :         PY_CHECK_TYPE(&netr_USER_KEY_UNION_Type, value, return -1;);
    7371           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7372           0 :                 PyErr_NoMemory();
    7373           0 :                 return -1;
    7374             :         }
    7375           0 :         object->keys = *(struct netr_USER_KEY_UNION *)pytalloc_get_ptr(value);
    7376           0 :         return 0;
    7377             : }
    7378             : 
    7379             : static PyGetSetDef py_netr_USER_KEYS_getsetters[] = {
    7380             :         {
    7381             :                 .name = discard_const_p(char, "version"),
    7382             :                 .get = py_netr_USER_KEYS_get_version,
    7383             :                 .set = py_netr_USER_KEYS_set_version,
    7384             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7385             :         },
    7386             :         {
    7387             :                 .name = discard_const_p(char, "keys"),
    7388             :                 .get = py_netr_USER_KEYS_get_keys,
    7389             :                 .set = py_netr_USER_KEYS_set_keys,
    7390             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY_UNION")
    7391             :         },
    7392             :         { .name = NULL }
    7393             : };
    7394             : 
    7395           0 : static PyObject *py_netr_USER_KEYS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7396             : {
    7397           0 :         return pytalloc_new(struct netr_USER_KEYS, type);
    7398             : }
    7399             : 
    7400           0 : static PyObject *py_netr_USER_KEYS_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7401             : {
    7402           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7403           0 :         PyObject *ret = NULL;
    7404             :         DATA_BLOB blob;
    7405             :         enum ndr_err_code err;
    7406           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7407           0 :         if (tmp_ctx == NULL) {
    7408           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7409           0 :                 return NULL;
    7410             :         }
    7411           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_USER_KEYS);
    7412           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7413           0 :                 TALLOC_FREE(tmp_ctx);
    7414           0 :                 PyErr_SetNdrError(err);
    7415           0 :                 return NULL;
    7416             :         }
    7417             : 
    7418           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7419           0 :         TALLOC_FREE(tmp_ctx);
    7420           0 :         return ret;
    7421             : }
    7422             : 
    7423           0 : static PyObject *py_netr_USER_KEYS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7424             : {
    7425           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7426           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7427           0 :         Py_ssize_t blob_length = 0;
    7428             :         enum ndr_err_code err;
    7429           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7430           0 :         PyObject *allow_remaining_obj = NULL;
    7431           0 :         bool allow_remaining = false;
    7432             : 
    7433           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7434             :                 discard_const_p(char *, kwnames),
    7435             :                 &blob.data, &blob_length,
    7436             :                 &allow_remaining_obj)) {
    7437           0 :                 return NULL;
    7438             :         }
    7439           0 :         blob.length = blob_length;
    7440             : 
    7441           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7442           0 :                 allow_remaining = true;
    7443             :         }
    7444             : 
    7445           0 :         if (allow_remaining) {
    7446           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
    7447             :         } else {
    7448           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
    7449             :         }
    7450           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7451           0 :                 PyErr_SetNdrError(err);
    7452           0 :                 return NULL;
    7453             :         }
    7454             : 
    7455           0 :         Py_RETURN_NONE;
    7456             : }
    7457             : 
    7458           0 : static PyObject *py_netr_USER_KEYS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7459             : {
    7460           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7461             :         PyObject *ret;
    7462             :         char *retstr;
    7463             : 
    7464           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_USER_KEYS, "netr_USER_KEYS", object);
    7465           0 :         ret = PyUnicode_FromString(retstr);
    7466           0 :         talloc_free(retstr);
    7467             : 
    7468           0 :         return ret;
    7469             : }
    7470             : 
    7471             : static PyMethodDef py_netr_USER_KEYS_methods[] = {
    7472             :         { "__ndr_pack__", (PyCFunction)py_netr_USER_KEYS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7473             :         { "__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" },
    7474             :         { "__ndr_print__", (PyCFunction)py_netr_USER_KEYS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7475             :         { NULL, NULL, 0, NULL }
    7476             : };
    7477             : 
    7478             : 
    7479             : static PyTypeObject netr_USER_KEYS_Type = {
    7480             :         PyVarObject_HEAD_INIT(NULL, 0)
    7481             :         .tp_name = "netlogon.netr_USER_KEYS",
    7482             :         .tp_getset = py_netr_USER_KEYS_getsetters,
    7483             :         .tp_methods = py_netr_USER_KEYS_methods,
    7484             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7485             :         .tp_new = py_netr_USER_KEYS_new,
    7486             : };
    7487             : 
    7488             : 
    7489           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag(PyObject *obj, void *closure)
    7490             : {
    7491           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7492             :         PyObject *py_SensitiveDataFlag;
    7493           0 :         py_SensitiveDataFlag = PyLong_FromLong((uint16_t)object->SensitiveDataFlag);
    7494           0 :         return py_SensitiveDataFlag;
    7495             : }
    7496             : 
    7497           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag(PyObject *py_obj, PyObject *value, void *closure)
    7498             : {
    7499           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7500           0 :         if (value == NULL) {
    7501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveDataFlag");
    7502           0 :                 return -1;
    7503             :         }
    7504             :         {
    7505           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveDataFlag));
    7506           0 :                 if (PyLong_Check(value)) {
    7507             :                         unsigned long long test_var;
    7508           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7509           0 :                         if (PyErr_Occurred() != NULL) {
    7510           0 :                                 return -1;
    7511             :                         }
    7512           0 :                         if (test_var > uint_max) {
    7513           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7514             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7515           0 :                                 return -1;
    7516             :                         }
    7517           0 :                         object->SensitiveDataFlag = test_var;
    7518             :                 } else {
    7519           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7520             :                           PyLong_Type.tp_name);
    7521           0 :                         return -1;
    7522             :                 }
    7523             :         }
    7524           0 :         return 0;
    7525             : }
    7526             : 
    7527           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_DataLength(PyObject *obj, void *closure)
    7528             : {
    7529           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7530             :         PyObject *py_DataLength;
    7531           0 :         py_DataLength = PyLong_FromUnsignedLongLong((uint32_t)object->DataLength);
    7532           0 :         return py_DataLength;
    7533             : }
    7534             : 
    7535           0 : static int py_netr_USER_PRIVATE_INFO_set_DataLength(PyObject *py_obj, PyObject *value, void *closure)
    7536             : {
    7537           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7538           0 :         if (value == NULL) {
    7539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->DataLength");
    7540           0 :                 return -1;
    7541             :         }
    7542             :         {
    7543           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->DataLength));
    7544           0 :                 if (PyLong_Check(value)) {
    7545             :                         unsigned long long test_var;
    7546           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7547           0 :                         if (PyErr_Occurred() != NULL) {
    7548           0 :                                 return -1;
    7549             :                         }
    7550           0 :                         if (test_var > uint_max) {
    7551           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7552             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7553           0 :                                 return -1;
    7554             :                         }
    7555           0 :                         object->DataLength = test_var;
    7556             :                 } else {
    7557           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7558             :                           PyLong_Type.tp_name);
    7559           0 :                         return -1;
    7560             :                 }
    7561             :         }
    7562           0 :         return 0;
    7563             : }
    7564             : 
    7565           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveData(PyObject *obj, void *closure)
    7566             : {
    7567           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7568             :         PyObject *py_SensitiveData;
    7569           0 :         if (object->SensitiveData == NULL) {
    7570           0 :                 Py_RETURN_NONE;
    7571             :         }
    7572           0 :         if (object->SensitiveData == NULL) {
    7573           0 :                 py_SensitiveData = Py_None;
    7574           0 :                 Py_INCREF(py_SensitiveData);
    7575             :         } else {
    7576           0 :                 py_SensitiveData = PyList_New(object->DataLength);
    7577           0 :                 if (py_SensitiveData == NULL) {
    7578           0 :                         return NULL;
    7579             :                 }
    7580             :                 {
    7581             :                         int SensitiveData_cntr_1;
    7582           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < (object->DataLength); SensitiveData_cntr_1++) {
    7583             :                                 PyObject *py_SensitiveData_1;
    7584           0 :                                 py_SensitiveData_1 = PyLong_FromLong((uint16_t)object->SensitiveData[SensitiveData_cntr_1]);
    7585           0 :                                 PyList_SetItem(py_SensitiveData, SensitiveData_cntr_1, py_SensitiveData_1);
    7586             :                         }
    7587             :                 }
    7588             :         }
    7589           0 :         return py_SensitiveData;
    7590             : }
    7591             : 
    7592           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveData(PyObject *py_obj, PyObject *value, void *closure)
    7593             : {
    7594           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7595           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->SensitiveData));
    7596           0 :         if (value == NULL) {
    7597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveData");
    7598           0 :                 return -1;
    7599             :         }
    7600           0 :         if (value == Py_None) {
    7601           0 :                 object->SensitiveData = NULL;
    7602             :         } else {
    7603           0 :                 object->SensitiveData = NULL;
    7604           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7605             :                 {
    7606             :                         int SensitiveData_cntr_1;
    7607           0 :                         object->SensitiveData = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->SensitiveData, PyList_GET_SIZE(value));
    7608           0 :                         if (!object->SensitiveData) { return -1;; }
    7609           0 :                         talloc_set_name_const(object->SensitiveData, "ARRAY: object->SensitiveData");
    7610           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < PyList_GET_SIZE(value); SensitiveData_cntr_1++) {
    7611           0 :                                 if (PyList_GET_ITEM(value, SensitiveData_cntr_1) == NULL) {
    7612           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveData[SensitiveData_cntr_1]");
    7613           0 :                                         return -1;
    7614             :                                 }
    7615             :                                 {
    7616           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveData[SensitiveData_cntr_1]));
    7617           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, SensitiveData_cntr_1))) {
    7618             :                                                 unsigned long long test_var;
    7619           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, SensitiveData_cntr_1));
    7620           0 :                                                 if (PyErr_Occurred() != NULL) {
    7621           0 :                                                         return -1;
    7622             :                                                 }
    7623           0 :                                                 if (test_var > uint_max) {
    7624           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7625             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    7626           0 :                                                         return -1;
    7627             :                                                 }
    7628           0 :                                                 object->SensitiveData[SensitiveData_cntr_1] = test_var;
    7629             :                                         } else {
    7630           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7631             :                                                   PyLong_Type.tp_name);
    7632           0 :                                                 return -1;
    7633             :                                         }
    7634             :                                 }
    7635             :                         }
    7636             :                 }
    7637             :         }
    7638           0 :         return 0;
    7639             : }
    7640             : 
    7641             : static PyGetSetDef py_netr_USER_PRIVATE_INFO_getsetters[] = {
    7642             :         {
    7643             :                 .name = discard_const_p(char, "SensitiveDataFlag"),
    7644             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag,
    7645             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag,
    7646             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7647             :         },
    7648             :         {
    7649             :                 .name = discard_const_p(char, "DataLength"),
    7650             :                 .get = py_netr_USER_PRIVATE_INFO_get_DataLength,
    7651             :                 .set = py_netr_USER_PRIVATE_INFO_set_DataLength,
    7652             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7653             :         },
    7654             :         {
    7655             :                 .name = discard_const_p(char, "SensitiveData"),
    7656             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveData,
    7657             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveData,
    7658             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7659             :         },
    7660             :         { .name = NULL }
    7661             : };
    7662             : 
    7663           0 : static PyObject *py_netr_USER_PRIVATE_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7664             : {
    7665           0 :         return pytalloc_new(struct netr_USER_PRIVATE_INFO, type);
    7666             : }
    7667             : 
    7668             : 
    7669             : static PyTypeObject netr_USER_PRIVATE_INFO_Type = {
    7670             :         PyVarObject_HEAD_INIT(NULL, 0)
    7671             :         .tp_name = "netlogon.netr_USER_PRIVATE_INFO",
    7672             :         .tp_getset = py_netr_USER_PRIVATE_INFO_getsetters,
    7673             :         .tp_methods = NULL,
    7674             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7675             :         .tp_new = py_netr_USER_PRIVATE_INFO_new,
    7676             : };
    7677             : 
    7678             : 
    7679           0 : static PyObject *py_netr_DELTA_USER_get_account_name(PyObject *obj, void *closure)
    7680             : {
    7681           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7682             :         PyObject *py_account_name;
    7683           0 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    7684           0 :         return py_account_name;
    7685             : }
    7686             : 
    7687           0 : static int py_netr_DELTA_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    7688             : {
    7689           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7690           0 :         if (value == NULL) {
    7691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    7692           0 :                 return -1;
    7693             :         }
    7694           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7695           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7696           0 :                 PyErr_NoMemory();
    7697           0 :                 return -1;
    7698             :         }
    7699           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7700           0 :         return 0;
    7701             : }
    7702             : 
    7703           0 : static PyObject *py_netr_DELTA_USER_get_full_name(PyObject *obj, void *closure)
    7704             : {
    7705           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7706             :         PyObject *py_full_name;
    7707           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    7708           0 :         return py_full_name;
    7709             : }
    7710             : 
    7711           0 : static int py_netr_DELTA_USER_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    7712             : {
    7713           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7714           0 :         if (value == NULL) {
    7715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
    7716           0 :                 return -1;
    7717             :         }
    7718           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7719           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7720           0 :                 PyErr_NoMemory();
    7721           0 :                 return -1;
    7722             :         }
    7723           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7724           0 :         return 0;
    7725             : }
    7726             : 
    7727           0 : static PyObject *py_netr_DELTA_USER_get_rid(PyObject *obj, void *closure)
    7728             : {
    7729           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7730             :         PyObject *py_rid;
    7731           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
    7732           0 :         return py_rid;
    7733             : }
    7734             : 
    7735           0 : static int py_netr_DELTA_USER_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    7736             : {
    7737           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7738           0 :         if (value == NULL) {
    7739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
    7740           0 :                 return -1;
    7741             :         }
    7742             :         {
    7743           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    7744           0 :                 if (PyLong_Check(value)) {
    7745             :                         unsigned long long test_var;
    7746           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7747           0 :                         if (PyErr_Occurred() != NULL) {
    7748           0 :                                 return -1;
    7749             :                         }
    7750           0 :                         if (test_var > uint_max) {
    7751           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7752             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7753           0 :                                 return -1;
    7754             :                         }
    7755           0 :                         object->rid = test_var;
    7756             :                 } else {
    7757           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7758             :                           PyLong_Type.tp_name);
    7759           0 :                         return -1;
    7760             :                 }
    7761             :         }
    7762           0 :         return 0;
    7763             : }
    7764             : 
    7765           0 : static PyObject *py_netr_DELTA_USER_get_primary_gid(PyObject *obj, void *closure)
    7766             : {
    7767           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7768             :         PyObject *py_primary_gid;
    7769           0 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)object->primary_gid);
    7770           0 :         return py_primary_gid;
    7771             : }
    7772             : 
    7773           0 : static int py_netr_DELTA_USER_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    7774             : {
    7775           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7776           0 :         if (value == NULL) {
    7777           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
    7778           0 :                 return -1;
    7779             :         }
    7780             :         {
    7781           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    7782           0 :                 if (PyLong_Check(value)) {
    7783             :                         unsigned long long test_var;
    7784           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7785           0 :                         if (PyErr_Occurred() != NULL) {
    7786           0 :                                 return -1;
    7787             :                         }
    7788           0 :                         if (test_var > uint_max) {
    7789           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7790             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7791           0 :                                 return -1;
    7792             :                         }
    7793           0 :                         object->primary_gid = test_var;
    7794             :                 } else {
    7795           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7796             :                           PyLong_Type.tp_name);
    7797           0 :                         return -1;
    7798             :                 }
    7799             :         }
    7800           0 :         return 0;
    7801             : }
    7802             : 
    7803           0 : static PyObject *py_netr_DELTA_USER_get_home_directory(PyObject *obj, void *closure)
    7804             : {
    7805           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7806             :         PyObject *py_home_directory;
    7807           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    7808           0 :         return py_home_directory;
    7809             : }
    7810             : 
    7811           0 : static int py_netr_DELTA_USER_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    7812             : {
    7813           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7814           0 :         if (value == NULL) {
    7815           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_directory");
    7816           0 :                 return -1;
    7817             :         }
    7818           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7819           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7820           0 :                 PyErr_NoMemory();
    7821           0 :                 return -1;
    7822             :         }
    7823           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    7824           0 :         return 0;
    7825             : }
    7826             : 
    7827           0 : static PyObject *py_netr_DELTA_USER_get_home_drive(PyObject *obj, void *closure)
    7828             : {
    7829           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7830             :         PyObject *py_home_drive;
    7831           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    7832           0 :         return py_home_drive;
    7833             : }
    7834             : 
    7835           0 : static int py_netr_DELTA_USER_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    7836             : {
    7837           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7838           0 :         if (value == NULL) {
    7839           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_drive");
    7840           0 :                 return -1;
    7841             :         }
    7842           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7843           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7844           0 :                 PyErr_NoMemory();
    7845           0 :                 return -1;
    7846             :         }
    7847           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    7848           0 :         return 0;
    7849             : }
    7850             : 
    7851           0 : static PyObject *py_netr_DELTA_USER_get_logon_script(PyObject *obj, void *closure)
    7852             : {
    7853           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7854             :         PyObject *py_logon_script;
    7855           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    7856           0 :         return py_logon_script;
    7857             : }
    7858             : 
    7859           0 : static int py_netr_DELTA_USER_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    7860             : {
    7861           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7862           0 :         if (value == NULL) {
    7863           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_script");
    7864           0 :                 return -1;
    7865             :         }
    7866           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7867           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7868           0 :                 PyErr_NoMemory();
    7869           0 :                 return -1;
    7870             :         }
    7871           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    7872           0 :         return 0;
    7873             : }
    7874             : 
    7875           0 : static PyObject *py_netr_DELTA_USER_get_description(PyObject *obj, void *closure)
    7876             : {
    7877           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7878             :         PyObject *py_description;
    7879           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
    7880           0 :         return py_description;
    7881             : }
    7882             : 
    7883           0 : static int py_netr_DELTA_USER_set_description(PyObject *py_obj, PyObject *value, void *closure)
    7884             : {
    7885           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7886           0 :         if (value == NULL) {
    7887           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->description");
    7888           0 :                 return -1;
    7889             :         }
    7890           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7891           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7892           0 :                 PyErr_NoMemory();
    7893           0 :                 return -1;
    7894             :         }
    7895           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
    7896           0 :         return 0;
    7897             : }
    7898             : 
    7899           0 : static PyObject *py_netr_DELTA_USER_get_workstations(PyObject *obj, void *closure)
    7900             : {
    7901           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7902             :         PyObject *py_workstations;
    7903           0 :         py_workstations = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstations);
    7904           0 :         return py_workstations;
    7905             : }
    7906             : 
    7907           0 : static int py_netr_DELTA_USER_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
    7908             : {
    7909           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7910           0 :         if (value == NULL) {
    7911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstations");
    7912           0 :                 return -1;
    7913             :         }
    7914           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7915           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7916           0 :                 PyErr_NoMemory();
    7917           0 :                 return -1;
    7918             :         }
    7919           0 :         object->workstations = *(struct lsa_String *)pytalloc_get_ptr(value);
    7920           0 :         return 0;
    7921             : }
    7922             : 
    7923           0 : static PyObject *py_netr_DELTA_USER_get_last_logon(PyObject *obj, void *closure)
    7924             : {
    7925           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7926             :         PyObject *py_last_logon;
    7927           0 :         py_last_logon = PyLong_FromUnsignedLongLong(object->last_logon);
    7928           0 :         return py_last_logon;
    7929             : }
    7930             : 
    7931           0 : static int py_netr_DELTA_USER_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
    7932             : {
    7933           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7934           0 :         if (value == NULL) {
    7935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logon");
    7936           0 :                 return -1;
    7937             :         }
    7938             :         {
    7939           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logon));
    7940           0 :                 if (PyLong_Check(value)) {
    7941             :                         unsigned long long test_var;
    7942           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7943           0 :                         if (PyErr_Occurred() != NULL) {
    7944           0 :                                 return -1;
    7945             :                         }
    7946           0 :                         if (test_var > uint_max) {
    7947           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7948             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7949           0 :                                 return -1;
    7950             :                         }
    7951           0 :                         object->last_logon = test_var;
    7952             :                 } else {
    7953           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7954             :                           PyLong_Type.tp_name);
    7955           0 :                         return -1;
    7956             :                 }
    7957             :         }
    7958           0 :         return 0;
    7959             : }
    7960             : 
    7961           0 : static PyObject *py_netr_DELTA_USER_get_last_logoff(PyObject *obj, void *closure)
    7962             : {
    7963           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7964             :         PyObject *py_last_logoff;
    7965           0 :         py_last_logoff = PyLong_FromUnsignedLongLong(object->last_logoff);
    7966           0 :         return py_last_logoff;
    7967             : }
    7968             : 
    7969           0 : static int py_netr_DELTA_USER_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
    7970             : {
    7971           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7972           0 :         if (value == NULL) {
    7973           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logoff");
    7974           0 :                 return -1;
    7975             :         }
    7976             :         {
    7977           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logoff));
    7978           0 :                 if (PyLong_Check(value)) {
    7979             :                         unsigned long long test_var;
    7980           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7981           0 :                         if (PyErr_Occurred() != NULL) {
    7982           0 :                                 return -1;
    7983             :                         }
    7984           0 :                         if (test_var > uint_max) {
    7985           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7986             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7987           0 :                                 return -1;
    7988             :                         }
    7989           0 :                         object->last_logoff = test_var;
    7990             :                 } else {
    7991           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7992             :                           PyLong_Type.tp_name);
    7993           0 :                         return -1;
    7994             :                 }
    7995             :         }
    7996           0 :         return 0;
    7997             : }
    7998             : 
    7999           0 : static PyObject *py_netr_DELTA_USER_get_logon_hours(PyObject *obj, void *closure)
    8000             : {
    8001           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8002             :         PyObject *py_logon_hours;
    8003           0 :         py_logon_hours = pytalloc_reference_ex(samr_LogonHours_Type, pytalloc_get_mem_ctx(obj), &object->logon_hours);
    8004           0 :         return py_logon_hours;
    8005             : }
    8006             : 
    8007           0 : static int py_netr_DELTA_USER_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
    8008             : {
    8009           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8010           0 :         if (value == NULL) {
    8011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_hours");
    8012           0 :                 return -1;
    8013             :         }
    8014           0 :         PY_CHECK_TYPE(samr_LogonHours_Type, value, return -1;);
    8015           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8016           0 :                 PyErr_NoMemory();
    8017           0 :                 return -1;
    8018             :         }
    8019           0 :         object->logon_hours = *(struct samr_LogonHours *)pytalloc_get_ptr(value);
    8020           0 :         return 0;
    8021             : }
    8022             : 
    8023           0 : static PyObject *py_netr_DELTA_USER_get_bad_password_count(PyObject *obj, void *closure)
    8024             : {
    8025           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8026             :         PyObject *py_bad_password_count;
    8027           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)object->bad_password_count);
    8028           0 :         return py_bad_password_count;
    8029             : }
    8030             : 
    8031           0 : static int py_netr_DELTA_USER_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    8032             : {
    8033           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8034           0 :         if (value == NULL) {
    8035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_password_count");
    8036           0 :                 return -1;
    8037             :         }
    8038             :         {
    8039           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    8040           0 :                 if (PyLong_Check(value)) {
    8041             :                         unsigned long long test_var;
    8042           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8043           0 :                         if (PyErr_Occurred() != NULL) {
    8044           0 :                                 return -1;
    8045             :                         }
    8046           0 :                         if (test_var > uint_max) {
    8047           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8048             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8049           0 :                                 return -1;
    8050             :                         }
    8051           0 :                         object->bad_password_count = test_var;
    8052             :                 } else {
    8053           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8054             :                           PyLong_Type.tp_name);
    8055           0 :                         return -1;
    8056             :                 }
    8057             :         }
    8058           0 :         return 0;
    8059             : }
    8060             : 
    8061           0 : static PyObject *py_netr_DELTA_USER_get_logon_count(PyObject *obj, void *closure)
    8062             : {
    8063           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8064             :         PyObject *py_logon_count;
    8065           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    8066           0 :         return py_logon_count;
    8067             : }
    8068             : 
    8069           0 : static int py_netr_DELTA_USER_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    8070             : {
    8071           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8072           0 :         if (value == NULL) {
    8073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    8074           0 :                 return -1;
    8075             :         }
    8076             :         {
    8077           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    8078           0 :                 if (PyLong_Check(value)) {
    8079             :                         unsigned long long test_var;
    8080           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8081           0 :                         if (PyErr_Occurred() != NULL) {
    8082           0 :                                 return -1;
    8083             :                         }
    8084           0 :                         if (test_var > uint_max) {
    8085           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8086             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8087           0 :                                 return -1;
    8088             :                         }
    8089           0 :                         object->logon_count = test_var;
    8090             :                 } else {
    8091           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8092             :                           PyLong_Type.tp_name);
    8093           0 :                         return -1;
    8094             :                 }
    8095             :         }
    8096           0 :         return 0;
    8097             : }
    8098             : 
    8099           0 : static PyObject *py_netr_DELTA_USER_get_last_password_change(PyObject *obj, void *closure)
    8100             : {
    8101           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8102             :         PyObject *py_last_password_change;
    8103           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    8104           0 :         return py_last_password_change;
    8105             : }
    8106             : 
    8107           0 : static int py_netr_DELTA_USER_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    8108             : {
    8109           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8110           0 :         if (value == NULL) {
    8111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_password_change");
    8112           0 :                 return -1;
    8113             :         }
    8114             :         {
    8115           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    8116           0 :                 if (PyLong_Check(value)) {
    8117             :                         unsigned long long test_var;
    8118           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8119           0 :                         if (PyErr_Occurred() != NULL) {
    8120           0 :                                 return -1;
    8121             :                         }
    8122           0 :                         if (test_var > uint_max) {
    8123           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8124             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8125           0 :                                 return -1;
    8126             :                         }
    8127           0 :                         object->last_password_change = test_var;
    8128             :                 } else {
    8129           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8130             :                           PyLong_Type.tp_name);
    8131           0 :                         return -1;
    8132             :                 }
    8133             :         }
    8134           0 :         return 0;
    8135             : }
    8136             : 
    8137           0 : static PyObject *py_netr_DELTA_USER_get_acct_expiry(PyObject *obj, void *closure)
    8138             : {
    8139           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8140             :         PyObject *py_acct_expiry;
    8141           0 :         py_acct_expiry = PyLong_FromUnsignedLongLong(object->acct_expiry);
    8142           0 :         return py_acct_expiry;
    8143             : }
    8144             : 
    8145           0 : static int py_netr_DELTA_USER_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
    8146             : {
    8147           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8148           0 :         if (value == NULL) {
    8149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_expiry");
    8150           0 :                 return -1;
    8151             :         }
    8152             :         {
    8153           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_expiry));
    8154           0 :                 if (PyLong_Check(value)) {
    8155             :                         unsigned long long test_var;
    8156           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8157           0 :                         if (PyErr_Occurred() != NULL) {
    8158           0 :                                 return -1;
    8159             :                         }
    8160           0 :                         if (test_var > uint_max) {
    8161           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8162             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8163           0 :                                 return -1;
    8164             :                         }
    8165           0 :                         object->acct_expiry = test_var;
    8166             :                 } else {
    8167           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8168             :                           PyLong_Type.tp_name);
    8169           0 :                         return -1;
    8170             :                 }
    8171             :         }
    8172           0 :         return 0;
    8173             : }
    8174             : 
    8175           0 : static PyObject *py_netr_DELTA_USER_get_acct_flags(PyObject *obj, void *closure)
    8176             : {
    8177           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8178             :         PyObject *py_acct_flags;
    8179           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)object->acct_flags);
    8180           0 :         return py_acct_flags;
    8181             : }
    8182             : 
    8183           0 : static int py_netr_DELTA_USER_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    8184             : {
    8185           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8186           0 :         if (value == NULL) {
    8187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_flags");
    8188           0 :                 return -1;
    8189             :         }
    8190             :         {
    8191           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    8192           0 :                 if (PyLong_Check(value)) {
    8193             :                         unsigned long long test_var;
    8194           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8195           0 :                         if (PyErr_Occurred() != NULL) {
    8196           0 :                                 return -1;
    8197             :                         }
    8198           0 :                         if (test_var > uint_max) {
    8199           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8200             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8201           0 :                                 return -1;
    8202             :                         }
    8203           0 :                         object->acct_flags = test_var;
    8204             :                 } else {
    8205           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8206             :                           PyLong_Type.tp_name);
    8207           0 :                         return -1;
    8208             :                 }
    8209             :         }
    8210           0 :         return 0;
    8211             : }
    8212             : 
    8213           0 : static PyObject *py_netr_DELTA_USER_get_lmpassword(PyObject *obj, void *closure)
    8214             : {
    8215           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8216             :         PyObject *py_lmpassword;
    8217           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    8218           0 :         return py_lmpassword;
    8219             : }
    8220             : 
    8221           0 : static int py_netr_DELTA_USER_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    8222             : {
    8223           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8224           0 :         if (value == NULL) {
    8225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    8226           0 :                 return -1;
    8227             :         }
    8228           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8229           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8230           0 :                 PyErr_NoMemory();
    8231           0 :                 return -1;
    8232             :         }
    8233           0 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8234           0 :         return 0;
    8235             : }
    8236             : 
    8237           0 : static PyObject *py_netr_DELTA_USER_get_ntpassword(PyObject *obj, void *closure)
    8238             : {
    8239           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8240             :         PyObject *py_ntpassword;
    8241           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    8242           0 :         return py_ntpassword;
    8243             : }
    8244             : 
    8245           0 : static int py_netr_DELTA_USER_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    8246             : {
    8247           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8248           0 :         if (value == NULL) {
    8249           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    8250           0 :                 return -1;
    8251             :         }
    8252           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8253           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8254           0 :                 PyErr_NoMemory();
    8255           0 :                 return -1;
    8256             :         }
    8257           0 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8258           0 :         return 0;
    8259             : }
    8260             : 
    8261           0 : static PyObject *py_netr_DELTA_USER_get_nt_password_present(PyObject *obj, void *closure)
    8262             : {
    8263           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8264             :         PyObject *py_nt_password_present;
    8265           0 :         py_nt_password_present = PyLong_FromLong((uint16_t)object->nt_password_present);
    8266           0 :         return py_nt_password_present;
    8267             : }
    8268             : 
    8269           0 : static int py_netr_DELTA_USER_set_nt_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8270             : {
    8271           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8272           0 :         if (value == NULL) {
    8273           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_password_present");
    8274           0 :                 return -1;
    8275             :         }
    8276             :         {
    8277           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_password_present));
    8278           0 :                 if (PyLong_Check(value)) {
    8279             :                         unsigned long long test_var;
    8280           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8281           0 :                         if (PyErr_Occurred() != NULL) {
    8282           0 :                                 return -1;
    8283             :                         }
    8284           0 :                         if (test_var > uint_max) {
    8285           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8286             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8287           0 :                                 return -1;
    8288             :                         }
    8289           0 :                         object->nt_password_present = test_var;
    8290             :                 } else {
    8291           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8292             :                           PyLong_Type.tp_name);
    8293           0 :                         return -1;
    8294             :                 }
    8295             :         }
    8296           0 :         return 0;
    8297             : }
    8298             : 
    8299           0 : static PyObject *py_netr_DELTA_USER_get_lm_password_present(PyObject *obj, void *closure)
    8300             : {
    8301           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8302             :         PyObject *py_lm_password_present;
    8303           0 :         py_lm_password_present = PyLong_FromLong((uint16_t)object->lm_password_present);
    8304           0 :         return py_lm_password_present;
    8305             : }
    8306             : 
    8307           0 : static int py_netr_DELTA_USER_set_lm_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8308             : {
    8309           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8310           0 :         if (value == NULL) {
    8311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_password_present");
    8312           0 :                 return -1;
    8313             :         }
    8314             :         {
    8315           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_password_present));
    8316           0 :                 if (PyLong_Check(value)) {
    8317             :                         unsigned long long test_var;
    8318           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8319           0 :                         if (PyErr_Occurred() != NULL) {
    8320           0 :                                 return -1;
    8321             :                         }
    8322           0 :                         if (test_var > uint_max) {
    8323           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8324             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8325           0 :                                 return -1;
    8326             :                         }
    8327           0 :                         object->lm_password_present = test_var;
    8328             :                 } else {
    8329           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8330             :                           PyLong_Type.tp_name);
    8331           0 :                         return -1;
    8332             :                 }
    8333             :         }
    8334           0 :         return 0;
    8335             : }
    8336             : 
    8337           0 : static PyObject *py_netr_DELTA_USER_get_password_expired(PyObject *obj, void *closure)
    8338             : {
    8339           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8340             :         PyObject *py_password_expired;
    8341           0 :         py_password_expired = PyLong_FromLong((uint16_t)object->password_expired);
    8342           0 :         return py_password_expired;
    8343             : }
    8344             : 
    8345           0 : static int py_netr_DELTA_USER_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
    8346             : {
    8347           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8348           0 :         if (value == NULL) {
    8349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_expired");
    8350           0 :                 return -1;
    8351             :         }
    8352             :         {
    8353           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_expired));
    8354           0 :                 if (PyLong_Check(value)) {
    8355             :                         unsigned long long test_var;
    8356           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8357           0 :                         if (PyErr_Occurred() != NULL) {
    8358           0 :                                 return -1;
    8359             :                         }
    8360           0 :                         if (test_var > uint_max) {
    8361           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8362             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8363           0 :                                 return -1;
    8364             :                         }
    8365           0 :                         object->password_expired = test_var;
    8366             :                 } else {
    8367           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8368             :                           PyLong_Type.tp_name);
    8369           0 :                         return -1;
    8370             :                 }
    8371             :         }
    8372           0 :         return 0;
    8373             : }
    8374             : 
    8375           0 : static PyObject *py_netr_DELTA_USER_get_comment(PyObject *obj, void *closure)
    8376             : {
    8377           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8378             :         PyObject *py_comment;
    8379           0 :         py_comment = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->comment);
    8380           0 :         return py_comment;
    8381             : }
    8382             : 
    8383           0 : static int py_netr_DELTA_USER_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8384             : {
    8385           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8386           0 :         if (value == NULL) {
    8387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    8388           0 :                 return -1;
    8389             :         }
    8390           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8391           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8392           0 :                 PyErr_NoMemory();
    8393           0 :                 return -1;
    8394             :         }
    8395           0 :         object->comment = *(struct lsa_String *)pytalloc_get_ptr(value);
    8396           0 :         return 0;
    8397             : }
    8398             : 
    8399           0 : static PyObject *py_netr_DELTA_USER_get_parameters(PyObject *obj, void *closure)
    8400             : {
    8401           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8402             :         PyObject *py_parameters;
    8403           0 :         py_parameters = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->parameters);
    8404           0 :         return py_parameters;
    8405             : }
    8406             : 
    8407           0 : static int py_netr_DELTA_USER_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
    8408             : {
    8409           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8410           0 :         if (value == NULL) {
    8411           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parameters");
    8412           0 :                 return -1;
    8413             :         }
    8414           0 :         PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
    8415           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8416           0 :                 PyErr_NoMemory();
    8417           0 :                 return -1;
    8418             :         }
    8419           0 :         object->parameters = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
    8420           0 :         return 0;
    8421             : }
    8422             : 
    8423           0 : static PyObject *py_netr_DELTA_USER_get_country_code(PyObject *obj, void *closure)
    8424             : {
    8425           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8426             :         PyObject *py_country_code;
    8427           0 :         py_country_code = PyLong_FromLong((uint16_t)object->country_code);
    8428           0 :         return py_country_code;
    8429             : }
    8430             : 
    8431           0 : static int py_netr_DELTA_USER_set_country_code(PyObject *py_obj, PyObject *value, void *closure)
    8432             : {
    8433           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8434           0 :         if (value == NULL) {
    8435           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->country_code");
    8436           0 :                 return -1;
    8437             :         }
    8438             :         {
    8439           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->country_code));
    8440           0 :                 if (PyLong_Check(value)) {
    8441             :                         unsigned long long test_var;
    8442           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8443           0 :                         if (PyErr_Occurred() != NULL) {
    8444           0 :                                 return -1;
    8445             :                         }
    8446           0 :                         if (test_var > uint_max) {
    8447           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8448             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8449           0 :                                 return -1;
    8450             :                         }
    8451           0 :                         object->country_code = test_var;
    8452             :                 } else {
    8453           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8454             :                           PyLong_Type.tp_name);
    8455           0 :                         return -1;
    8456             :                 }
    8457             :         }
    8458           0 :         return 0;
    8459             : }
    8460             : 
    8461           0 : static PyObject *py_netr_DELTA_USER_get_code_page(PyObject *obj, void *closure)
    8462             : {
    8463           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8464             :         PyObject *py_code_page;
    8465           0 :         py_code_page = PyLong_FromLong((uint16_t)object->code_page);
    8466           0 :         return py_code_page;
    8467             : }
    8468             : 
    8469           0 : static int py_netr_DELTA_USER_set_code_page(PyObject *py_obj, PyObject *value, void *closure)
    8470             : {
    8471           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8472           0 :         if (value == NULL) {
    8473           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->code_page");
    8474           0 :                 return -1;
    8475             :         }
    8476             :         {
    8477           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->code_page));
    8478           0 :                 if (PyLong_Check(value)) {
    8479             :                         unsigned long long test_var;
    8480           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8481           0 :                         if (PyErr_Occurred() != NULL) {
    8482           0 :                                 return -1;
    8483             :                         }
    8484           0 :                         if (test_var > uint_max) {
    8485           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8486             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8487           0 :                                 return -1;
    8488             :                         }
    8489           0 :                         object->code_page = test_var;
    8490             :                 } else {
    8491           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8492             :                           PyLong_Type.tp_name);
    8493           0 :                         return -1;
    8494             :                 }
    8495             :         }
    8496           0 :         return 0;
    8497             : }
    8498             : 
    8499           0 : static PyObject *py_netr_DELTA_USER_get_user_private_info(PyObject *obj, void *closure)
    8500             : {
    8501           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8502             :         PyObject *py_user_private_info;
    8503           0 :         py_user_private_info = pytalloc_reference_ex(&netr_USER_PRIVATE_INFO_Type, pytalloc_get_mem_ctx(obj), &object->user_private_info);
    8504           0 :         return py_user_private_info;
    8505             : }
    8506             : 
    8507           0 : static int py_netr_DELTA_USER_set_user_private_info(PyObject *py_obj, PyObject *value, void *closure)
    8508             : {
    8509           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8510           0 :         if (value == NULL) {
    8511           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_private_info");
    8512           0 :                 return -1;
    8513             :         }
    8514           0 :         PY_CHECK_TYPE(&netr_USER_PRIVATE_INFO_Type, value, return -1;);
    8515           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8516           0 :                 PyErr_NoMemory();
    8517           0 :                 return -1;
    8518             :         }
    8519           0 :         object->user_private_info = *(struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(value);
    8520           0 :         return 0;
    8521             : }
    8522             : 
    8523           0 : static PyObject *py_netr_DELTA_USER_get_SecurityInformation(PyObject *obj, void *closure)
    8524             : {
    8525           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8526             :         PyObject *py_SecurityInformation;
    8527           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
    8528           0 :         return py_SecurityInformation;
    8529             : }
    8530             : 
    8531           0 : static int py_netr_DELTA_USER_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    8532             : {
    8533           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8534           0 :         if (value == NULL) {
    8535           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
    8536           0 :                 return -1;
    8537             :         }
    8538             :         {
    8539           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    8540           0 :                 if (PyLong_Check(value)) {
    8541             :                         unsigned long long test_var;
    8542           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8543           0 :                         if (PyErr_Occurred() != NULL) {
    8544           0 :                                 return -1;
    8545             :                         }
    8546           0 :                         if (test_var > uint_max) {
    8547           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8548             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8549           0 :                                 return -1;
    8550             :                         }
    8551           0 :                         object->SecurityInformation = test_var;
    8552             :                 } else {
    8553           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8554             :                           PyLong_Type.tp_name);
    8555           0 :                         return -1;
    8556             :                 }
    8557             :         }
    8558           0 :         return 0;
    8559             : }
    8560             : 
    8561           0 : static PyObject *py_netr_DELTA_USER_get_sdbuf(PyObject *obj, void *closure)
    8562             : {
    8563           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8564             :         PyObject *py_sdbuf;
    8565           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
    8566           0 :         return py_sdbuf;
    8567             : }
    8568             : 
    8569           0 : static int py_netr_DELTA_USER_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
    8570             : {
    8571           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8572           0 :         if (value == NULL) {
    8573           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
    8574           0 :                 return -1;
    8575             :         }
    8576           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    8577           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8578           0 :                 PyErr_NoMemory();
    8579           0 :                 return -1;
    8580             :         }
    8581           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    8582           0 :         return 0;
    8583             : }
    8584             : 
    8585           0 : static PyObject *py_netr_DELTA_USER_get_profile_path(PyObject *obj, void *closure)
    8586             : {
    8587           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8588             :         PyObject *py_profile_path;
    8589           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    8590           0 :         return py_profile_path;
    8591             : }
    8592             : 
    8593           0 : static int py_netr_DELTA_USER_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    8594             : {
    8595           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8596           0 :         if (value == NULL) {
    8597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->profile_path");
    8598           0 :                 return -1;
    8599             :         }
    8600           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8601           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8602           0 :                 PyErr_NoMemory();
    8603           0 :                 return -1;
    8604             :         }
    8605           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    8606           0 :         return 0;
    8607             : }
    8608             : 
    8609           0 : static PyObject *py_netr_DELTA_USER_get_unknown2(PyObject *obj, void *closure)
    8610             : {
    8611           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8612             :         PyObject *py_unknown2;
    8613           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    8614           0 :         return py_unknown2;
    8615             : }
    8616             : 
    8617           0 : static int py_netr_DELTA_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    8618             : {
    8619           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8620           0 :         if (value == NULL) {
    8621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    8622           0 :                 return -1;
    8623             :         }
    8624           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8625           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8626           0 :                 PyErr_NoMemory();
    8627           0 :                 return -1;
    8628             :         }
    8629           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8630           0 :         return 0;
    8631             : }
    8632             : 
    8633           0 : static PyObject *py_netr_DELTA_USER_get_unknown3(PyObject *obj, void *closure)
    8634             : {
    8635           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8636             :         PyObject *py_unknown3;
    8637           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    8638           0 :         return py_unknown3;
    8639             : }
    8640             : 
    8641           0 : static int py_netr_DELTA_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    8642             : {
    8643           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8644           0 :         if (value == NULL) {
    8645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    8646           0 :                 return -1;
    8647             :         }
    8648           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8649           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8650           0 :                 PyErr_NoMemory();
    8651           0 :                 return -1;
    8652             :         }
    8653           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8654           0 :         return 0;
    8655             : }
    8656             : 
    8657           0 : static PyObject *py_netr_DELTA_USER_get_unknown4(PyObject *obj, void *closure)
    8658             : {
    8659           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8660             :         PyObject *py_unknown4;
    8661           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    8662           0 :         return py_unknown4;
    8663             : }
    8664             : 
    8665           0 : static int py_netr_DELTA_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    8666             : {
    8667           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8668           0 :         if (value == NULL) {
    8669           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    8670           0 :                 return -1;
    8671             :         }
    8672           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8673           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8674           0 :                 PyErr_NoMemory();
    8675           0 :                 return -1;
    8676             :         }
    8677           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8678           0 :         return 0;
    8679             : }
    8680             : 
    8681           0 : static PyObject *py_netr_DELTA_USER_get_unknown5(PyObject *obj, void *closure)
    8682             : {
    8683           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8684             :         PyObject *py_unknown5;
    8685           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
    8686           0 :         return py_unknown5;
    8687             : }
    8688             : 
    8689           0 : static int py_netr_DELTA_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    8690             : {
    8691           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8692           0 :         if (value == NULL) {
    8693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
    8694           0 :                 return -1;
    8695             :         }
    8696             :         {
    8697           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    8698           0 :                 if (PyLong_Check(value)) {
    8699             :                         unsigned long long test_var;
    8700           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8701           0 :                         if (PyErr_Occurred() != NULL) {
    8702           0 :                                 return -1;
    8703             :                         }
    8704           0 :                         if (test_var > uint_max) {
    8705           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8706             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8707           0 :                                 return -1;
    8708             :                         }
    8709           0 :                         object->unknown5 = test_var;
    8710             :                 } else {
    8711           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8712             :                           PyLong_Type.tp_name);
    8713           0 :                         return -1;
    8714             :                 }
    8715             :         }
    8716           0 :         return 0;
    8717             : }
    8718             : 
    8719           0 : static PyObject *py_netr_DELTA_USER_get_unknown6(PyObject *obj, void *closure)
    8720             : {
    8721           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8722             :         PyObject *py_unknown6;
    8723           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    8724           0 :         return py_unknown6;
    8725             : }
    8726             : 
    8727           0 : static int py_netr_DELTA_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    8728             : {
    8729           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8730           0 :         if (value == NULL) {
    8731           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    8732           0 :                 return -1;
    8733             :         }
    8734             :         {
    8735           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    8736           0 :                 if (PyLong_Check(value)) {
    8737             :                         unsigned long long test_var;
    8738           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8739           0 :                         if (PyErr_Occurred() != NULL) {
    8740           0 :                                 return -1;
    8741             :                         }
    8742           0 :                         if (test_var > uint_max) {
    8743           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8744             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8745           0 :                                 return -1;
    8746             :                         }
    8747           0 :                         object->unknown6 = test_var;
    8748             :                 } else {
    8749           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8750             :                           PyLong_Type.tp_name);
    8751           0 :                         return -1;
    8752             :                 }
    8753             :         }
    8754           0 :         return 0;
    8755             : }
    8756             : 
    8757           0 : static PyObject *py_netr_DELTA_USER_get_unknown7(PyObject *obj, void *closure)
    8758             : {
    8759           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8760             :         PyObject *py_unknown7;
    8761           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    8762           0 :         return py_unknown7;
    8763             : }
    8764             : 
    8765           0 : static int py_netr_DELTA_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    8766             : {
    8767           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8768           0 :         if (value == NULL) {
    8769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    8770           0 :                 return -1;
    8771             :         }
    8772             :         {
    8773           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    8774           0 :                 if (PyLong_Check(value)) {
    8775             :                         unsigned long long test_var;
    8776           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8777           0 :                         if (PyErr_Occurred() != NULL) {
    8778           0 :                                 return -1;
    8779             :                         }
    8780           0 :                         if (test_var > uint_max) {
    8781           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8782             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8783           0 :                                 return -1;
    8784             :                         }
    8785           0 :                         object->unknown7 = test_var;
    8786             :                 } else {
    8787           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8788             :                           PyLong_Type.tp_name);
    8789           0 :                         return -1;
    8790             :                 }
    8791             :         }
    8792           0 :         return 0;
    8793             : }
    8794             : 
    8795           0 : static PyObject *py_netr_DELTA_USER_get_unknown8(PyObject *obj, void *closure)
    8796             : {
    8797           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8798             :         PyObject *py_unknown8;
    8799           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    8800           0 :         return py_unknown8;
    8801             : }
    8802             : 
    8803           0 : static int py_netr_DELTA_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    8804             : {
    8805           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8806           0 :         if (value == NULL) {
    8807           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    8808           0 :                 return -1;
    8809             :         }
    8810             :         {
    8811           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    8812           0 :                 if (PyLong_Check(value)) {
    8813             :                         unsigned long long test_var;
    8814           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8815           0 :                         if (PyErr_Occurred() != NULL) {
    8816           0 :                                 return -1;
    8817             :                         }
    8818           0 :                         if (test_var > uint_max) {
    8819           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8820             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8821           0 :                                 return -1;
    8822             :                         }
    8823           0 :                         object->unknown8 = test_var;
    8824             :                 } else {
    8825           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8826             :                           PyLong_Type.tp_name);
    8827           0 :                         return -1;
    8828             :                 }
    8829             :         }
    8830           0 :         return 0;
    8831             : }
    8832             : 
    8833             : static PyGetSetDef py_netr_DELTA_USER_getsetters[] = {
    8834             :         {
    8835             :                 .name = discard_const_p(char, "account_name"),
    8836             :                 .get = py_netr_DELTA_USER_get_account_name,
    8837             :                 .set = py_netr_DELTA_USER_set_account_name,
    8838             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8839             :         },
    8840             :         {
    8841             :                 .name = discard_const_p(char, "full_name"),
    8842             :                 .get = py_netr_DELTA_USER_get_full_name,
    8843             :                 .set = py_netr_DELTA_USER_set_full_name,
    8844             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8845             :         },
    8846             :         {
    8847             :                 .name = discard_const_p(char, "rid"),
    8848             :                 .get = py_netr_DELTA_USER_get_rid,
    8849             :                 .set = py_netr_DELTA_USER_set_rid,
    8850             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8851             :         },
    8852             :         {
    8853             :                 .name = discard_const_p(char, "primary_gid"),
    8854             :                 .get = py_netr_DELTA_USER_get_primary_gid,
    8855             :                 .set = py_netr_DELTA_USER_set_primary_gid,
    8856             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8857             :         },
    8858             :         {
    8859             :                 .name = discard_const_p(char, "home_directory"),
    8860             :                 .get = py_netr_DELTA_USER_get_home_directory,
    8861             :                 .set = py_netr_DELTA_USER_set_home_directory,
    8862             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8863             :         },
    8864             :         {
    8865             :                 .name = discard_const_p(char, "home_drive"),
    8866             :                 .get = py_netr_DELTA_USER_get_home_drive,
    8867             :                 .set = py_netr_DELTA_USER_set_home_drive,
    8868             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8869             :         },
    8870             :         {
    8871             :                 .name = discard_const_p(char, "logon_script"),
    8872             :                 .get = py_netr_DELTA_USER_get_logon_script,
    8873             :                 .set = py_netr_DELTA_USER_set_logon_script,
    8874             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8875             :         },
    8876             :         {
    8877             :                 .name = discard_const_p(char, "description"),
    8878             :                 .get = py_netr_DELTA_USER_get_description,
    8879             :                 .set = py_netr_DELTA_USER_set_description,
    8880             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8881             :         },
    8882             :         {
    8883             :                 .name = discard_const_p(char, "workstations"),
    8884             :                 .get = py_netr_DELTA_USER_get_workstations,
    8885             :                 .set = py_netr_DELTA_USER_set_workstations,
    8886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8887             :         },
    8888             :         {
    8889             :                 .name = discard_const_p(char, "last_logon"),
    8890             :                 .get = py_netr_DELTA_USER_get_last_logon,
    8891             :                 .set = py_netr_DELTA_USER_set_last_logon,
    8892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8893             :         },
    8894             :         {
    8895             :                 .name = discard_const_p(char, "last_logoff"),
    8896             :                 .get = py_netr_DELTA_USER_get_last_logoff,
    8897             :                 .set = py_netr_DELTA_USER_set_last_logoff,
    8898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8899             :         },
    8900             :         {
    8901             :                 .name = discard_const_p(char, "logon_hours"),
    8902             :                 .get = py_netr_DELTA_USER_get_logon_hours,
    8903             :                 .set = py_netr_DELTA_USER_set_logon_hours,
    8904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_LogonHours")
    8905             :         },
    8906             :         {
    8907             :                 .name = discard_const_p(char, "bad_password_count"),
    8908             :                 .get = py_netr_DELTA_USER_get_bad_password_count,
    8909             :                 .set = py_netr_DELTA_USER_set_bad_password_count,
    8910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8911             :         },
    8912             :         {
    8913             :                 .name = discard_const_p(char, "logon_count"),
    8914             :                 .get = py_netr_DELTA_USER_get_logon_count,
    8915             :                 .set = py_netr_DELTA_USER_set_logon_count,
    8916             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8917             :         },
    8918             :         {
    8919             :                 .name = discard_const_p(char, "last_password_change"),
    8920             :                 .get = py_netr_DELTA_USER_get_last_password_change,
    8921             :                 .set = py_netr_DELTA_USER_set_last_password_change,
    8922             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8923             :         },
    8924             :         {
    8925             :                 .name = discard_const_p(char, "acct_expiry"),
    8926             :                 .get = py_netr_DELTA_USER_get_acct_expiry,
    8927             :                 .set = py_netr_DELTA_USER_set_acct_expiry,
    8928             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8929             :         },
    8930             :         {
    8931             :                 .name = discard_const_p(char, "acct_flags"),
    8932             :                 .get = py_netr_DELTA_USER_get_acct_flags,
    8933             :                 .set = py_netr_DELTA_USER_set_acct_flags,
    8934             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    8935             :         },
    8936             :         {
    8937             :                 .name = discard_const_p(char, "lmpassword"),
    8938             :                 .get = py_netr_DELTA_USER_get_lmpassword,
    8939             :                 .set = py_netr_DELTA_USER_set_lmpassword,
    8940             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    8941             :         },
    8942             :         {
    8943             :                 .name = discard_const_p(char, "ntpassword"),
    8944             :                 .get = py_netr_DELTA_USER_get_ntpassword,
    8945             :                 .set = py_netr_DELTA_USER_set_ntpassword,
    8946             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    8947             :         },
    8948             :         {
    8949             :                 .name = discard_const_p(char, "nt_password_present"),
    8950             :                 .get = py_netr_DELTA_USER_get_nt_password_present,
    8951             :                 .set = py_netr_DELTA_USER_set_nt_password_present,
    8952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    8953             :         },
    8954             :         {
    8955             :                 .name = discard_const_p(char, "lm_password_present"),
    8956             :                 .get = py_netr_DELTA_USER_get_lm_password_present,
    8957             :                 .set = py_netr_DELTA_USER_set_lm_password_present,
    8958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    8959             :         },
    8960             :         {
    8961             :                 .name = discard_const_p(char, "password_expired"),
    8962             :                 .get = py_netr_DELTA_USER_get_password_expired,
    8963             :                 .set = py_netr_DELTA_USER_set_password_expired,
    8964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    8965             :         },
    8966             :         {
    8967             :                 .name = discard_const_p(char, "comment"),
    8968             :                 .get = py_netr_DELTA_USER_get_comment,
    8969             :                 .set = py_netr_DELTA_USER_set_comment,
    8970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8971             :         },
    8972             :         {
    8973             :                 .name = discard_const_p(char, "parameters"),
    8974             :                 .get = py_netr_DELTA_USER_get_parameters,
    8975             :                 .set = py_netr_DELTA_USER_set_parameters,
    8976             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
    8977             :         },
    8978             :         {
    8979             :                 .name = discard_const_p(char, "country_code"),
    8980             :                 .get = py_netr_DELTA_USER_get_country_code,
    8981             :                 .set = py_netr_DELTA_USER_set_country_code,
    8982             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8983             :         },
    8984             :         {
    8985             :                 .name = discard_const_p(char, "code_page"),
    8986             :                 .get = py_netr_DELTA_USER_get_code_page,
    8987             :                 .set = py_netr_DELTA_USER_set_code_page,
    8988             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8989             :         },
    8990             :         {
    8991             :                 .name = discard_const_p(char, "user_private_info"),
    8992             :                 .get = py_netr_DELTA_USER_get_user_private_info,
    8993             :                 .set = py_netr_DELTA_USER_set_user_private_info,
    8994             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_PRIVATE_INFO")
    8995             :         },
    8996             :         {
    8997             :                 .name = discard_const_p(char, "SecurityInformation"),
    8998             :                 .get = py_netr_DELTA_USER_get_SecurityInformation,
    8999             :                 .set = py_netr_DELTA_USER_set_SecurityInformation,
    9000             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9001             :         },
    9002             :         {
    9003             :                 .name = discard_const_p(char, "sdbuf"),
    9004             :                 .get = py_netr_DELTA_USER_get_sdbuf,
    9005             :                 .set = py_netr_DELTA_USER_set_sdbuf,
    9006             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    9007             :         },
    9008             :         {
    9009             :                 .name = discard_const_p(char, "profile_path"),
    9010             :                 .get = py_netr_DELTA_USER_get_profile_path,
    9011             :                 .set = py_netr_DELTA_USER_set_profile_path,
    9012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9013             :         },
    9014             :         {
    9015             :                 .name = discard_const_p(char, "unknown2"),
    9016             :                 .get = py_netr_DELTA_USER_get_unknown2,
    9017             :                 .set = py_netr_DELTA_USER_set_unknown2,
    9018             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9019             :         },
    9020             :         {
    9021             :                 .name = discard_const_p(char, "unknown3"),
    9022             :                 .get = py_netr_DELTA_USER_get_unknown3,
    9023             :                 .set = py_netr_DELTA_USER_set_unknown3,
    9024             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9025             :         },
    9026             :         {
    9027             :                 .name = discard_const_p(char, "unknown4"),
    9028             :                 .get = py_netr_DELTA_USER_get_unknown4,
    9029             :                 .set = py_netr_DELTA_USER_set_unknown4,
    9030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9031             :         },
    9032             :         {
    9033             :                 .name = discard_const_p(char, "unknown5"),
    9034             :                 .get = py_netr_DELTA_USER_get_unknown5,
    9035             :                 .set = py_netr_DELTA_USER_set_unknown5,
    9036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9037             :         },
    9038             :         {
    9039             :                 .name = discard_const_p(char, "unknown6"),
    9040             :                 .get = py_netr_DELTA_USER_get_unknown6,
    9041             :                 .set = py_netr_DELTA_USER_set_unknown6,
    9042             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9043             :         },
    9044             :         {
    9045             :                 .name = discard_const_p(char, "unknown7"),
    9046             :                 .get = py_netr_DELTA_USER_get_unknown7,
    9047             :                 .set = py_netr_DELTA_USER_set_unknown7,
    9048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9049             :         },
    9050             :         {
    9051             :                 .name = discard_const_p(char, "unknown8"),
    9052             :                 .get = py_netr_DELTA_USER_get_unknown8,
    9053             :                 .set = py_netr_DELTA_USER_set_unknown8,
    9054             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9055             :         },
    9056             :         { .name = NULL }
    9057             : };
    9058             : 
    9059           0 : static PyObject *py_netr_DELTA_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9060             : {
    9061           0 :         return pytalloc_new(struct netr_DELTA_USER, type);
    9062             : }
    9063             : 
    9064             : 
    9065             : static PyTypeObject netr_DELTA_USER_Type = {
    9066             :         PyVarObject_HEAD_INIT(NULL, 0)
    9067             :         .tp_name = "netlogon.netr_DELTA_USER",
    9068             :         .tp_getset = py_netr_DELTA_USER_getsetters,
    9069             :         .tp_methods = NULL,
    9070             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9071             :         .tp_new = py_netr_DELTA_USER_new,
    9072             : };
    9073             : 
    9074             : 
    9075           0 : static PyObject *py_netr_DELTA_DOMAIN_get_domain_name(PyObject *obj, void *closure)
    9076             : {
    9077           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9078             :         PyObject *py_domain_name;
    9079           0 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    9080           0 :         return py_domain_name;
    9081             : }
    9082             : 
    9083           0 : static int py_netr_DELTA_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    9084             : {
    9085           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9086           0 :         if (value == NULL) {
    9087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
    9088           0 :                 return -1;
    9089             :         }
    9090           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9091           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9092           0 :                 PyErr_NoMemory();
    9093           0 :                 return -1;
    9094             :         }
    9095           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    9096           0 :         return 0;
    9097             : }
    9098             : 
    9099           0 : static PyObject *py_netr_DELTA_DOMAIN_get_oem_information(PyObject *obj, void *closure)
    9100             : {
    9101           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9102             :         PyObject *py_oem_information;
    9103           0 :         py_oem_information = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->oem_information);
    9104           0 :         return py_oem_information;
    9105             : }
    9106             : 
    9107           0 : static int py_netr_DELTA_DOMAIN_set_oem_information(PyObject *py_obj, PyObject *value, void *closure)
    9108             : {
    9109           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9110           0 :         if (value == NULL) {
    9111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oem_information");
    9112           0 :                 return -1;
    9113             :         }
    9114           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9115           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9116           0 :                 PyErr_NoMemory();
    9117           0 :                 return -1;
    9118             :         }
    9119           0 :         object->oem_information = *(struct lsa_String *)pytalloc_get_ptr(value);
    9120           0 :         return 0;
    9121             : }
    9122             : 
    9123           0 : static PyObject *py_netr_DELTA_DOMAIN_get_force_logoff_time(PyObject *obj, void *closure)
    9124             : {
    9125           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9126             :         PyObject *py_force_logoff_time;
    9127           0 :         py_force_logoff_time = PyLong_FromLongLong(object->force_logoff_time);
    9128           0 :         return py_force_logoff_time;
    9129             : }
    9130             : 
    9131           0 : static int py_netr_DELTA_DOMAIN_set_force_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    9132             : {
    9133           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9134           0 :         if (value == NULL) {
    9135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->force_logoff_time");
    9136           0 :                 return -1;
    9137             :         }
    9138             :         {
    9139           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->force_logoff_time));
    9140           0 :                 const long long int_min = -int_max - 1;
    9141           0 :                 if (PyLong_Check(value)) {
    9142             :                         long long test_var;
    9143           0 :                         test_var = PyLong_AsLongLong(value);
    9144           0 :                         if (PyErr_Occurred() != NULL) {
    9145           0 :                                 return -1;
    9146             :                         }
    9147           0 :                         if (test_var < int_min || test_var > int_max) {
    9148           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    9149             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9150           0 :                                 return -1;
    9151             :                         }
    9152           0 :                         object->force_logoff_time = test_var;
    9153             :                 } else {
    9154           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9155             :                           PyLong_Type.tp_name);
    9156           0 :                         return -1;
    9157             :                 }
    9158             :         }
    9159           0 :         return 0;
    9160             : }
    9161             : 
    9162           0 : static PyObject *py_netr_DELTA_DOMAIN_get_min_password_length(PyObject *obj, void *closure)
    9163             : {
    9164           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9165             :         PyObject *py_min_password_length;
    9166           0 :         py_min_password_length = PyLong_FromLong((uint16_t)object->min_password_length);
    9167           0 :         return py_min_password_length;
    9168             : }
    9169             : 
    9170           0 : static int py_netr_DELTA_DOMAIN_set_min_password_length(PyObject *py_obj, PyObject *value, void *closure)
    9171             : {
    9172           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9173           0 :         if (value == NULL) {
    9174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->min_password_length");
    9175           0 :                 return -1;
    9176             :         }
    9177             :         {
    9178           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->min_password_length));
    9179           0 :                 if (PyLong_Check(value)) {
    9180             :                         unsigned long long test_var;
    9181           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9182           0 :                         if (PyErr_Occurred() != NULL) {
    9183           0 :                                 return -1;
    9184             :                         }
    9185           0 :                         if (test_var > uint_max) {
    9186           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9187             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9188           0 :                                 return -1;
    9189             :                         }
    9190           0 :                         object->min_password_length = test_var;
    9191             :                 } else {
    9192           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9193             :                           PyLong_Type.tp_name);
    9194           0 :                         return -1;
    9195             :                 }
    9196             :         }
    9197           0 :         return 0;
    9198             : }
    9199             : 
    9200           0 : static PyObject *py_netr_DELTA_DOMAIN_get_password_history_length(PyObject *obj, void *closure)
    9201             : {
    9202           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9203             :         PyObject *py_password_history_length;
    9204           0 :         py_password_history_length = PyLong_FromLong((uint16_t)object->password_history_length);
    9205           0 :         return py_password_history_length;
    9206             : }
    9207             : 
    9208           0 : static int py_netr_DELTA_DOMAIN_set_password_history_length(PyObject *py_obj, PyObject *value, void *closure)
    9209             : {
    9210           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9211           0 :         if (value == NULL) {
    9212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_history_length");
    9213           0 :                 return -1;
    9214             :         }
    9215             :         {
    9216           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_history_length));
    9217           0 :                 if (PyLong_Check(value)) {
    9218             :                         unsigned long long test_var;
    9219           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9220           0 :                         if (PyErr_Occurred() != NULL) {
    9221           0 :                                 return -1;
    9222             :                         }